AlConicAttributes
 
 
 

Interface to Alias conic curve attributes.

Synopsis

#include <AlConicAttributes.h>
class AlConicAttributes : public AlAttributes
virtual AlObjectType	type() const;
AlObject*	copyWrapper() const;
statusCode	coefficients( double&, double&, double&, double&, double&, double& ) const;
double	zDisplacement() const;
statusCode	startPoint( double&, double& ) const;
statusCode	endPoint( double&, double& ) const;
statusCode	centerPoint( double&, double& ) const;
statusCode	transform( double[4][4] ) const;
statusCode	transform( AlTM& ) const;
AlConicType	form() const;

Description

AlConicAttributes is a class derived from the AlAttributes class. This class allows access to the attributes for a conic section.

Conics may not be created, but they can be brought into Alias through the IGES interface.

A conic is one of ellipse, hyperbola, parabola, circle, or line. Conics exist in the XY plane and are defined by the equation: A * X^2 + B * X * Y + C * Y^2 + D * X + E * Y + F = 0.

AlObjectType AlConicAttributes::type() const

Description

Returns the class identifier ’kConicAttributeType’.

AlObject* AlConicAttributes::copyWrapper() const

Description

Makes a copy of the AlConicAttributes. The returned AlConicAttributes will reference the same data as the original.

statusCode AlConicAttributes::coefficients( double& c_a, double& c_b, double& c_c, double& c_d, double& c_e, double& c_f ) const

Description

Determines the coefficients for the Conic, where the Conic is defined by the equation:

A * X^2 + B * X * Y + C * Y^2 + D * X + E * Y + F = 0

Arguments

> c_a - the coefficient A

> c_b - the coefficient B

> c_c - the coefficient C

> c_d - the coefficient D

> c_e - the coefficient E

> c_f - the coefficient F

Return Codes

sSuccess - coefficients were successfully returned

sInvalidObject - the attribute was invalid

sFailure - an error occurred

double AlConicAttributes::zDisplacement() const

Description

Returns the displacement for the conic along the Z axis.

statusCode AlConicAttributes::startPoint( double& x, double& y ) const

Description

Determines the start point for a conic. Note that for an ellipse the direction of the desired elliptical arc is counterclockwise.

Arguments

> x - x coordinate of the start point

> y - y coordinate of the start point

Return Codes

sSuccess - the start point was successfully returned

sInvalidObject - the attribute was invalid

sFailure - an error occurred

statusCode AlConicAttributes::endPoint( double& x, double& y ) const

Description

Determines the end point for a conic. Note that for an ellipse the direction of the desired elliptical arc is counterclockwise.

Arguments

> x - x coordinate of the end point

> y - y coordinate of the end point

Return Codes

sSuccess - the end point was successfully returned

sInvalidObject - the attribute was invalid

sFailure - an error occurred

statusCode AlConicAttributes::centerPoint( double& x, double& y ) const

Description

Determines the center point for a conic.

Arguments

> x - x coordinate of the center point

< y - y coordinate of the center point

Return Codes

sSuccess - the center point was successfully returned.

sInvalidObject - the attribute was invalid

sFailure - an error occurred

statusCode AlConicAttributes::transform( AlTM& tm ) const

Description

Returns the transformation matrix which transforms the 2D conic into 3D.

Arguments

> tm - where to place the resulting transformation matrix

Return Codes

sSuccess - the transform was successfully returned

sInvalidObject - the attribute was invalid

sFailure - an error occurred

statusCode AlConicAttributes::transform( double tm[4][4] ) const

Description

A conic is defined in the XY plane. This method returns the transformation matrix that transforms the 2D conic into 3D.

Arguments

> tm - where to place the transformation matrix

Return Codes

sSuccess - the transform was successfully returned

sInvalidArgument - ’tm’ was NULL

sInvalidObject - the attribute was invalid

sFailure - an error occurred

AlConicType AlConicAttributes::form() const

Description

Returns the type of the conic. One of kEllipse, kHyperbola, kParabola, kCircle, or kLine may be returned. kNoConic may be returned if the attribute is no longer active or there is an error.