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

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

#include <angelcad.h>

Inheritance diagram for cone:
solid shape

Public Member Functions

 cone (double h, double r1, double r2, bool center=false)
 Create cone extending in z direction. More...
 
double h () const
 height of cone More...
 
double height () const
 height of cone More...
 
double r1 () const
 bottom radius More...
 
double r2 () const
 top radius More...
 
double radius1 () const
 bottom radius More...
 
double radius2 () const
 top radius 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

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

A cone extends in the z-direction.
By default the bottom is at origin

Constructor & Destructor Documentation

◆ cone()

cone::cone ( double  h,
double  r1,
double  r2,
bool  center = false 
)

Create cone extending in z direction.

Parameters
hdouble, height of cone
r1double, bottom radius of cone
r2double, top radius of cone
centerbool, true if cone is centered in z-direction

Member Function Documentation

◆ h()

double cone::h ( ) const

height of cone

Returns
double, height of cone

◆ height()

double cone::height ( ) const

height of cone

Returns
double, height of cone

◆ r1()

double cone::r1 ( ) const

bottom radius

Returns
double, bottom radius

◆ r2()

double cone::r2 ( ) const

top radius

Returns
double, top radius

◆ radius1()

double cone::radius1 ( ) const

bottom radius

Returns
double, bottom radius

◆ radius2()

double cone::radius2 ( ) const

top radius

Returns
double, top radius

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