Hi,
I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe. However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe. Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction. // Module turbconnect module turbconnect(){ translate([tcdistx/2+1.2,0,tcdistz]) difference(){ translate([0,2.2,hacdist-tcheight/2+0]) rotate([30.0,0]) linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference(){ square([7,3],true); square([6.5,2.5],true); } rotate([0,90,0]) linear_extrude(tcheight,center=true,convexity=10) circle(r=iwdiamo11/2); translate([0,0,haddist]) rotate([0,90,0]) linear_extrude(tcheight,center=true,convexity=10) circle(r=haddiamo/2); } } The first linear_extrude is the culprit. The last two code segment is just cutting the end of the connector to fit nicely. Thanks ahead, Infocean _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
can you supply declarations for the variables that would render a typical representation of this object?
what are you using for tcdistx, tcdistz, hacdist, tcheight, iwdiamo11, haddist? > On Mar 27, 2021, at 2:30 PM, (null) (null) via Discuss <[hidden email]> wrote: > > Hi, > > I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe. However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe. Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction. > > // Module turbconnect > module turbconnect(){ > translate([tcdistx/2+1.2,0,tcdistz]) > difference(){ > translate([0,2.2,hacdist-tcheight/2+0]) > rotate([30.0,0]) > linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) > difference(){ > square([7,3],true); > square([6.5,2.5],true); > } > > rotate([0,90,0]) > linear_extrude(tcheight,center=true,convexity=10) > circle(r=iwdiamo11/2); > > translate([0,0,haddist]) > rotate([0,90,0]) > linear_extrude(tcheight,center=true,convexity=10) > circle(r=haddiamo/2); > > } > } > > > The first linear_extrude is the culprit. The last two code segment is just cutting the end of the connector to fit nicely. > > Thanks ahead, > Infocean > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to [hidden email] OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Hmm... I replied to this message on March 27 or 28, but looks like it was deleted from the forum although I .
tcdistx = 10.5; tcdistz = 0; tcheight = 8; hacdist = 12.5; iwdiamo11 = 16; haddist = 12.5; haddiamo = 3; Here are some pictures for illustrations of the my problem A. scale=[1,1], that is no scaling From the side: Screen_Shot_2021-03-27_at_8.png from the back: Screen_Shot_2021-03-27_at_8.png B. scale=[1,0.3] From the side: Screen_Shot_2021-03-27_at_8.png from the back: Screen_Shot_2021-03-27_at_8.png As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction. C. scale=[0.3,1] From the side: Screen_Shot_2021-03-27_at_8.png From the back: Screen_Shot_2021-03-27_at_8.png In this last case the scaling was again at the small pipe and in the x-direction. What I need is an y-direction scale down at the big pipe. To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling. Thanks ahead, Infocean P.S. OpenSCAD does not allow extruding to negative z-direction. Interestingly, negative’s scaling is allowed. ;-) Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
All your Screenshots are the same. URLs are identical.
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by OpenSCAD mailing list-2
Hello again…
Thanks for supplying the variables and now i’m a little confused as the render your code produces seems to have no relevance to connecting pipes. :) Also, all the images you provided were the same image so they didn’t provide me with any greater insight into what you’re trying to accomplish. Your code produced this: All your pictures were this single image.
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Well, Looks like the forum interface messed it up. Now I am sending the images from my computer via email. A. scale=[1,1], that is no scaling From the side: From the back: B. scale=[1,0.3] From the side: From the back: As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction. C. scale=[0.3,1] From the side: From the back: In this last case the scaling was again at the small pipe and in the x-direction. What I need is an y-direction scale down at the big pipe. To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling. Thanks ahead, János P.S. OpenSCAD does not allow extruding to negative z-direction. Interestingly, negative’s scaling is allowed. ;-) _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Okay, I think I may have a better idea of what you’re trying to do. I’d like to suggest that maybe linear_extrude may not be the way you want to go. When I’m trying to do the kind of thing you’re doing I use a module I created which I present in simplified form: module hull_extrude(height, trans = [0,0], rot = [0,0,0]) { rotate([0,-90,0]) hull() rotate([0,90,0]) { linear_extrude(.01) children(0); translate([trans.x, trans.y, height - .01]) rotate(rot) linear_extrude(.01) children(1); } } It uses hull() to marry 2 dimensional shapes in useful ways. You can offset and even rotate different shapes to achieve some useful geometries. here’s a bit of code and a screen capture to show you what I mean… hull_extrude(10) { square([10,20], center = true); square([5,15], center = true); } translate([20,0,0]) hull_extrude(10, trans = [5,7]) { square([10,20], center = true); square([5,15], center = true); } translate([40,0,0]) hull_extrude(10) { square([10,20], center = true); circle(5); } translate([60,0,0]) hull_extrude(10, rot = [20,0,0]) { circle(5); square([10,20], center = true); }
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
I'm happy to try to help, but I'm having trouble understanding what
you're trying to do and what the problem is.
Probably the best first step is to eliminate unnecessary complexity from the discussion. When asking a question in any forum, that's a good first step: isolate the problem down to the thing that you're having trouble with, so that your readers won't have to try to understand parts of the example that aren't really parts of the question. You say "the first linear_extrude is the culprit". That's: which produces:tcheight = 8; linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference() { square([7,3],true); square([6.5,2.5],true); } I'm not understanding what you mean by "the radial direction" and "the axial direction". Can we talk about X, Y, and Z in this picture? You've got it set up so that the top and bottom are the same size in Y, but the top is smaller in X. That's what the "scale=[0.11, 1]" means. Is the bottom of this object the shape that you want, a hollow rectangle with outside dimensions [7, 3] and inside dimensions [6.5, 2.5]? Is the top of the object the shape that you want, a hollow rectangle with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]? I suspect that one problem is that the walls are scaled down in the X axis, so that they are 0.5 thick at the bottom and 0.055 thick at the top. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Hi Jordan,
Maybe showing the parts in axiometric will make clear what is my problem. So, here is 3 pictures. On the first one the scaling is 1,1 As you can see there are 4 smaller diameter pipes connecting to the bigger pipe in a slanted way. The width of the connectors along the x-axis is constant and their thickness is also and about the same as the diameter of the small pipes at the location of the connector.. On the second one scaling is 0.3,1 Here the width, x-direction, is reduced at the small pipes. The thickness remained constant. On the third one the scaling is 1,0.3 Here the x-directional width remained the same as on the firs picture, but the thickness, again at the small pipe was reduced. I want the width remain the same and the thickness be reduced at the big pipe. I hope now it is clear. I do not know how to scale that way with linear_extrude. Thanks ahead, Infocean
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
The three pictures all look the same to me. Perhaps you can highlight the places you want us to look at?? Jon On 4/4/2021 9:51 PM, (null) (null) via
Discuss wrote:
Hi Jordan, _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Hi Jon,
Here they are again. The Blue colors connector is the problem. If you look closely, you can see that they are not the same.
Thanks ahead, Infocean
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by OpenSCAD mailing list-2
On 4/4/2021 6:51 PM, (null) (null) via
Discuss wrote:
Going back to a simpler object: tcheight = 8; linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference(){ square([7,3],true); square([6.5,2.5],true); } I think you are saying that you want the base of the object, the big end, to be smaller in Y, while leaving the top, the small end, the same size. You're absolutely right - you cannot accomplish that by playing with the scale parameter to a linear extrude. The base of a linear extrude is *not affected* by the scale. (Or by the twist.) The whole idea is that it starts at the size and orientation of the 2D object being extruded, and then scales (or twists) from that as you move to the top. So what do you do? Change the size of the 2D object! Use the scale to control the size at the top. Here's a new version that puts the desired dimensions in variables so that you can see where the derived values come from. Don't manually mess with the scaling factors. Set the desired dimensions at the ends, and then calculate the scaling factor that will produce that result. tcheight = 8; bottom_odims = [3, 3]; bottom_idims = bottom_odims - [0.5, 0.5]; top_dims = [0.77, 3]; lxscale = [ top_dims[0]/bottom_odims[0], top_dims[1]/bottom_odims[1] ]; linear_extrude(tcheight,center=true,convexity=10, scale=lxscale) difference(){ square(bottom_odims,true); square(bottom_idims,true); } Is that looking more like the shape you're looking for? Top the same size as before, bottom the same in Y and smaller in X? HOWEVER... as I noted earlier, even if this is heading in the right direction for the *outside* of the object, it's not right for the *inside*. We'll worry about that once we've got the right shape on the outside. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
On 4/5/2021 9:28 AM, Jordan Brown
wrote:
Correction: smaller in X. I got this wrong when I initially wrote, and failed to fix this reference.
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Free forum by Nabble | Edit this page |