use pyo3::prelude::*;
pub fn register_module(py: Python<'_>, parent_module: &PyModule) -> PyResult<()>
{
let isometric = PyModule::new(py, "isometric")?;
super::legendre::py::register_module(py, isometric)?;
parent_module.add_submodule(isometric)?;
isometric.add_class::<SWFJC>()?;
Ok(())
}
#[pyclass]
#[derive(Copy, Clone)]
pub struct SWFJC
{
#[pyo3(get)]
pub hinge_mass: f64,
#[pyo3(get)]
pub link_length: f64,
#[pyo3(get)]
pub number_of_links: u8,
#[pyo3(get)]
pub well_width: f64,
#[pyo3(get)]
pub legendre: super::legendre::py::SWFJC
}
#[pymethods]
impl SWFJC
{
#[new]
pub fn init(number_of_links: u8, link_length: f64, hinge_mass: f64, well_width: f64) -> Self
{
SWFJC
{
hinge_mass,
link_length,
number_of_links,
well_width,
legendre: super::legendre::py::SWFJC::init(number_of_links, link_length, hinge_mass, well_width)
}
}
}