Struct scad::ScadFile [−][src]
pub struct ScadFile { /* fields omitted */ }
Object that stores scad objects along with global parameters for the objects. Also has methods for writing the data to files.
Methods
impl ScadFile
[src]
impl ScadFile
pub fn new() -> ScadFile
[src]
pub fn new() -> ScadFile
pub fn get_code(&self) -> String
[src]
pub fn get_code(&self) -> String
Returns the code for the global parameters as well as all the children in the file
pub fn add_object(&mut self, object: ScadObject)
[src]
pub fn add_object(&mut self, object: ScadObject)
pub fn set_detail(&mut self, detail: i32)
[src]
pub fn set_detail(&mut self, detail: i32)
Sets the $fn variable for the whole file. This varibale defines the detail amount for cylindrical objects
pub fn write_to_file(&self, path: String) -> bool
[src]
pub fn write_to_file(&self, path: String) -> bool
Writes the resulting code to a file
##Arguments
path: The path to the file where we want to write relative to the current working directory.
##Returns The function will return false and print a message to the console if writing fails.