[][src]Macro rgmsh::add_points

macro_rules! add_points {
    (@accum, $kernel_name:ident, $vec:ident) => { ... };
    (@accum, $kernel_name:ident, $vec:ident, ($x:expr, $y:expr, $z:expr) $(, $tail:tt)*) => { ... };
    (@accum, $kernel_name:ident, $vec:ident, ($x:expr, $y:expr, $z:expr, $lc:expr) $(, $tail:tt)*) => { ... };
    ($kernel_name:ident, $($points:tt),+) => { ... };
}

Add points to a geometry model inline.

You can use add_points! to create a series of points inline.

Both regular points and points with characteristic lengths are supported.

This macro returns a new Vec<PointTag>.

let mut geom = gmsh.create_occ_model("model")?;
let lc = 1e-2;
let rect_pts = add_points![geom,
                          (0., 0., 0.),      // basic point
                          (0.1, 0., 0., lc), // point with a target mesh size
                          (0.1, 0.3, 0., lc),
                          (0., 0.3, 0.)];

for pt in rect_pts.iter() {
    println!("{:?}", pt);
}