AngelCAD  1.5-00
Public Member Functions | List of all members
cylinder Class Reference

cylinder with axis in z-direction, by default extending from origin More...

#include <angelcad.h>

Inheritance diagram for cylinder:
solid shape

Public Member Functions

 cylinder (double h, double r, bool center=false)
 Create cylinder. More...
 
double h () const
 Height of cylnder. More...
 
double height () const
 Height of cylnder. More...
 
double r () const
 Radius of cylnder. More...
 
double radius () const
 Radius of cylnder. More...
 
- Public Member Functions inherited from solid
solidopAdd (solid@ b)
 Boolean union operator+ overload. More...
 
solidopAnd (solid@ b)
 Boolean intersection operator& overload. More...
 
solidopMul (tmatrix@ matrix)
 Transform object by matrix multiplication: solid@ o2 = T * o1. More...
 
solidopSub (solid@ b)
 Boolean difference operator- overload. More...
 
- Public Member Functions inherited from shape
boundingboxbox () const
 Return bounding box of object. More...
 
tmatrixtransform () const
 Return transformation matrix of object. More...
 
void write_csg (string path)
 Write object to OpenSCAD .csg file. More...
 
void write_xcsg (string path, double secant_tolerance=- 1.0)
 Write object to .xcsg file for processing by xcsg program. More...
 

Detailed Description

cylinder with axis in z-direction, by default extending from origin

A cylinder is defined by height and radius.
By default the cuboid extends from the origin, in z-direction.

Constructor & Destructor Documentation

◆ cylinder()

cylinder::cylinder ( double  h,
double  r,
bool  center = false 
)

Create cylinder.

Parameters
hdouble, height of cylinder
rdouble, radius of cylinder
centerbool, true if cylinder is centered on origin in z-direction

Member Function Documentation

◆ h()

double cylinder::h ( ) const

Height of cylnder.

Returns
double, height of cylnder

◆ height()

double cylinder::height ( ) const

Height of cylnder.

Returns
double, height of cylnder

◆ r()

double cylinder::r ( ) const

Radius of cylnder.

Returns
double, radius of cylnder

◆ radius()

double cylinder::radius ( ) const

Radius of cylnder.

Returns
double, radius of cylnder

The documentation for this class was generated from the following file: