[Gmsh] Problem: extrusion with rotation
Robert Funnell
robert.funnell at mcgill.ca
Sun Dec 28 12:33:24 CET 2008
On Sun, 28 Dec 2008, Christophe Geuzaine wrote:
> Robert Funnell wrote:
>> I am trying to create a geometry corresponding to a cylinder which has a
>> bend. As shown in the Gmsh code appended below, I am using an extrusion
>> with translation, a 2nd extrusion with translation + rotation, and a 3rd
>> extrusion with just translation.
>>
>> The 2nd extrusion begins from the end of the 1st extrusion, as intended.
>> However, the final circular surface of the 2nd extrusion isn't located at
>> the end of the extrusion, but rather is offset in the y and z directions,
>> so the 3rd extrusion doesn't start in the right place. (The effect can be
>> seen in the screenshot at
>> http://audilab.bmed.mcgill.ca/~funnell/gmsh_bad_extrude.png .)
>>
>> If I do either translation or rotation alone in the 2nd extrusion, I get
>> the results that I expect.
>>
>> Could someone please explain what I'm doing wrong here?
>>
>
> Your rotation looks weird. Here's an example:
> ...
> extr2[] = Extrude { {1,0,0}, // direction of rotation axis
> {0,2,20}, // a point on the rotation axis
> -Pi/2 } { // the rotation angle
> Surface{extr1[0]};
> };
> ...
Ah, how embarrassing. I was somehow thinking that I needed to combine
an extrusion with the rotation in order to get the desired radius of
curvature. And if one combines an extrusion with a rotation in a
nonsensical way then one gets a nonsensical result :-) Thank you.
- Robert