[][src]Struct rgmsh::OccModel

pub struct OccModel<'a> {
    pub name: &'static str,
    pub c_name: CString,
    // some fields omitted
}

An instance of the OpenCASCADE geometry kernel.

Fields

name: &'static str

The model name.

c_name: CString

The model name used to talk to C.

Methods

impl<'a> OccModel<'a>[src]

#[must_use] pub fn add_point(&mut self, x: f64, y: f64, z: f64) -> GmshResult<PointTag>[src]

Add a point to the model by specifying its coordinates.

#[must_use] pub fn add_point_with_lc(
    &mut self,
    x: f64,
    y: f64,
    z: f64,
    lc: f64
) -> GmshResult<PointTag>
[src]

Add a point to the model and specify a target mesh size lc there.

pub fn remove_point(&mut self, p: PointTag) -> GmshResult<()>[src]

Delete a point from the Gmsh model.

#[must_use] pub fn add_line(&mut self, p1: PointTag, p2: PointTag) -> GmshResult<CurveTag>[src]

Add a straight line between two points.

#[must_use] pub fn add_curve_loop(&mut self, curves: &[CurveTag]) -> GmshResult<WireTag>[src]

Add a curve loop from a closed set of curves.

#[must_use] pub fn add_plane_surface(&mut self, boundary: WireTag) -> GmshResult<SurfaceTag>[src]

Add a surface from a WireTag of a closed curve set.

pub fn curve_or_surface_op<T: Into<CurveOrSurface>>(&mut self, gen_entity: T)[src]

A certain operation that only works for curves and surfaces.

#[must_use] pub fn add_plane_surface_with_holes(
    &mut self,
    boundary: WireTag,
    holes: &[WireTag]
) -> GmshResult<SurfaceTag>
[src]

Add a surface with holes.

impl<'a> OccModel<'a>[src]

#[must_use] pub fn add_box(
    &mut self,
    start_point: (f64, f64, f64),
    extents: (f64, f64, f64)
) -> GmshResult<VolumeTag>
[src]

Add a box with a starting point and side lengths from that point.

#[must_use] pub fn add_sphere(
    &mut self,
    centroid: (f64, f64, f64),
    radius: f64
) -> GmshResult<VolumeTag>
[src]

Add a sphere with a centroid and radius.

#[must_use] pub fn add_sphere_section(
    &mut self,
    centroid: (f64, f64, f64),
    radius: f64,
    polar: (f64, f64),
    azimuth: f64
) -> GmshResult<VolumeTag>
[src]

Add an angular section of a sphere. The polar angles are (min, max) relative to the x-axis on the xy-plane, and the azimuth is relative to the z-axis.

use std::f64::consts;

// make a 1/8th sphere section
let sphere_section = geom.add_sphere_section(
                         (0., 0., 0.), 1.,
                         (0., consts::FRAC_PI_2),
                         consts::FRAC_PI_2)?;

// recover a basic sphere by setting polar = (-π/2, π/2) and azimuth = 2π.
let basic_sphere = geom.add_sphere_section(
                       (10., 10., 10.), 1.,
                       (-consts::FRAC_PI_2, consts::FRAC_PI_2),
                       2. * consts::PI)?;

#[must_use] pub fn add_torus_experimental(&mut self, torus: Torus) -> GmshResult<VolumeTag>[src]

Add a torus to the model.

let centroid = Point { x: 1.0, y: 1.0, z: 1.0 };
let torus = geom.add_torus_experimental(
    Torus {
      centroid,
      main_radius: 3.0,
      pipe_radius: 0.2
    })?;

#[must_use] pub fn add_torus(
    &mut self,
    centroid: (f64, f64, f64),
    radii: (f64, f64)
) -> GmshResult<VolumeTag>
[src]

Add a torus with a centroid and radii values (main_radius, pipe_radius).

#[must_use] pub fn add_torus_section(
    &mut self,
    centroid: (f64, f64, f64),
    radii: (f64, f64),
    angle: f64
) -> GmshResult<VolumeTag>
[src]

Add an angular torus section using the main torus radius. To recover a basic torus, set the angle parameter to 2π.

impl<'a> OccModel<'a>[src]

#[must_use] pub fn create(_: &'a Gmsh, name: &'static str) -> GmshResult<Self>[src]

Create a new Gmsh model.

pub fn remove(self) -> GmshResult<()>[src]

Remove model from Gmsh.

pub fn set_current(&self) -> GmshResult<()>[src]

Set model to current model.

pub fn synchronize(&mut self) -> GmshResult<()>[src]

Synchronize the underlying CAD representation.

pub fn generate_mesh(&mut self, dim: i32) -> GmshResult<()>[src]

Mesh the model.

Auto Trait Implementations

impl<'a> Send for OccModel<'a>

impl<'a> Sync for OccModel<'a>

impl<'a> Unpin for OccModel<'a>

impl<'a> UnwindSafe for OccModel<'a>

impl<'a> RefUnwindSafe for OccModel<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]