[Gmsh] Extrude Bspline
Vincent Le Goff
vincentlegoff at ymail.com
Sat Nov 1 20:02:27 CET 2014
Hi all,
First of all, thank you very much for this powerful tool. It's making some
geometry work much simpler than it could have been in any other geometry
software !
I'm facing a frustrating issue though. I'd like to build a circular
perforated plate. The hole is defined by a closed BSpline curve. Everything
works well in 2D, but when I extrude the surface to build the plate, the 3D
surface mesh is attached to the first control point of the bspline. This is
an unexpected behavior as this control point isn't on the bspline.
I could find any solution either in the forums, nor in the bug database (may
be related to ticket #184 ?). Any idea what could be the issue ? Any other
method to build the same geometry ?
Thanks,
Vincent
--
Here is my simple geo file. As control points are randomly generated ,
reload the script until you get a non intersected bspline :
// Input Parameters
n=6; // Number of lobes
e=4; // Thickness of the plate
x1=4; // Position of the first surface
Rmax=350; // External circle radius
dm=10; // Mesh info
// Meshing parameters
Mesh.CharacteristicLengthFromCurvature = 1;
lc=2;
// ***********************************
// First lobe control points angles
t1 = 0;
t2 = Rand(Pi/3);
t3 = Rand(Pi/3);
t4 = Rand(Pi/3);
// First lobe control points radius
r1=100;
r2=50+Rand(250);
r3=50+Rand(250);
r4=50+Rand(250);
// First lobe control points x,y
Point(1) = {x1, r1*Cos(t1), r1*Sin(t1), 3};
Point(2) = {x1, r2*Cos(t2), r2*Sin(t2), 3};
Point(3) = {x1, r3*Cos(t3), r3*Sin(t3), 3};
Point(4) = {x1, r4*Cos(t4), r4*Sin(t4), 3};
// Replicate control points over 2*Pi
For k In {1:n-1}
Rotate {{x1, 0, 0}, {0, 0, 0}, 2*Pi*k/n} {
Duplicata { Point{1};Point{2};Point{3};Point{4};}
}
EndFor
// Build Bspline
BSpline(100) =
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, 1};
// Build external circle by extruding 1 point
Point(25) = {x1, 0, Rmax, dm};
// The created circle arc will be identified as 101
Extrude {{x1, 0, 0}, {0, 0, 0}, 2*Pi/3} {
Point{25};
}
// The created circle arc will be identified as 102
Extrude {{x1, 0, 0}, {0, 0, 0}, 2*Pi/3} {
Point{26};
}
// The created circle arc will be identified as 103
//Point 27 is the center of the circle
Extrude {{x1, 0, 0}, {0, 0, 0}, 2*Pi/3} {
Point{28};
}
// Build 2D surface
Line Loop(200) = {101, 102, 103};
Line Loop(201) = {100};
Plane Surface(300) = {200, 201};
//Build volume by extruding surface
Extrude {e, 0, 0} {
Surface{300}; Layers{1};
}
Coherence;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20141101/650be38d/attachment.html>