gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXld (Operator)

Name

gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXld — Create an XLD contour that corresponds to an elliptic arc.

Signature

gen_ellipse_contour_xld( : ContEllipse : Row, Column, Phi, Radius1, Radius2, StartPhi, EndPhi, PointOrder, Resolution : )

Herror gen_ellipse_contour_xld(Hobject* ContEllipse, double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const char* PointOrder, double Resolution)

Herror T_gen_ellipse_contour_xld(Hobject* ContEllipse, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, const Htuple StartPhi, const Htuple EndPhi, const Htuple PointOrder, const Htuple Resolution)

void GenEllipseContourXld(HObject* ContEllipse, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartPhi, const HTuple& EndPhi, const HTuple& PointOrder, const HTuple& Resolution)

void HXLDCont::GenEllipseContourXld(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartPhi, const HTuple& EndPhi, const HTuple& PointOrder, double Resolution)

void HXLDCont::GenEllipseContourXld(double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const HString& PointOrder, double Resolution)

void HXLDCont::GenEllipseContourXld(double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const char* PointOrder, double Resolution)

void HXLDCont::GenEllipseContourXld(double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const wchar_t* PointOrder, double Resolution)   (Windows only)

static void HOperatorSet.GenEllipseContourXld(out HObject contEllipse, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startPhi, HTuple endPhi, HTuple pointOrder, HTuple resolution)

void HXLDCont.GenEllipseContourXld(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startPhi, HTuple endPhi, HTuple pointOrder, double resolution)

void HXLDCont.GenEllipseContourXld(double row, double column, double phi, double radius1, double radius2, double startPhi, double endPhi, string pointOrder, double resolution)

Description

gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXld creates one or more elliptic arcs or closed ellipses. Ellipses are specified by their center (RowRowRowRowrow, ColumnColumnColumnColumncolumn), the orientation of the main axis PhiPhiPhiPhiphi, the length of the larger half axis Radius1Radius1Radius1Radius1radius1, and the length of the smaller half axis Radius2Radius2Radius2Radius2radius2. In addition to that, elliptic arcs are characterized by the angle of the start point StartPhiStartPhiStartPhiStartPhistartPhi, the angle of the end point EndPhiEndPhiEndPhiEndPhiendPhi, and the point order PointOrderPointOrderPointOrderPointOrderpointOrder along the boundary. Both the angle of the start point and the angle of the end point are measured from the positive main axis specified with PhiPhiPhiPhiphi. They correspond to the smallest surrounding circle of the ellipse. The actual start and end point of the ellipse is the intersection of the ellipse with the orthogonal projection of the corresponding circle point onto the main axis. Both angles refer to the coordinate system of the ellipse, i.e. relative to the main axis and in a mathematical positive direction. Thus, the two main poles correspond to the angles 0 and , the two minor poles to the angles and . To create a closed ellipse the values 0 and (with positive point order) have to be passed to the operator. All angles PhiPhiPhiPhiphi, StartPhiStartPhiStartPhiStartPhistartPhi, EndPhiEndPhiEndPhiEndPhiendPhi take arbitrary values and are mapped internally to the interval . The resolution of the resulting contours ContEllipseContEllipseContEllipseContEllipsecontEllipse is controlled via ResolutionResolutionResolutionResolutionresolution containing the maximum Euclidean distance between neighboring contour points. The resolution is set to the smallest valid value, if the input value falls below this value.

Execution Information

Parameters

ContEllipseContEllipseContEllipseContEllipsecontEllipse (output_object)  xld_cont(-array) objectHXLDContHXLDContHobject *

Resulting contour.

RowRowRowRowrow (input_control)  ellipse.center.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the center of the ellipse.

Default value: 200.0

ColumnColumnColumnColumncolumn (input_control)  ellipse.center.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the center of the ellipse.

Default value: 200.0

PhiPhiPhiPhiphi (input_control)  ellipse.angle.rad(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Orientation of the main axis [rad].

Default value: 0.0

Radius1Radius1Radius1Radius1radius1 (input_control)  ellipse.radius1(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Length of the larger half axis.

Default value: 100.0

Restriction: Radius1 > 0

Radius2Radius2Radius2Radius2radius2 (input_control)  ellipse.radius2(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Length of the smaller half axis.

Default value: 50.0

Restriction: Radius2 >= 0 && Radius2 <= Radius1

StartPhiStartPhiStartPhiStartPhistartPhi (input_control)  angle.rad(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Angle of the start point on the smallest surrounding circle [rad].

Default value: 0.0

EndPhiEndPhiEndPhiEndPhiendPhi (input_control)  angle.rad(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Angle of the end point on the smallest surrounding circle [rad].

Default value: 6.28318

PointOrderPointOrderPointOrderPointOrderpointOrder (input_control)  string(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

point order along the boundary.

Default value: 'positive' "positive" "positive" "positive" "positive"

List of values: 'negative'"negative""negative""negative""negative", 'positive'"positive""positive""positive""positive"

ResolutionResolutionResolutionResolutionresolution (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Resolution: Maximum distance between neighboring contour points.

Default value: 1.5

Restriction: Resolution >= 1.192e-7

Example (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
                       sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)

Example (C)

draw_ellipse(WindowHandle,&Row,&Column,&Phi,&Radius1,&Radius2);
gen_ellipse_contour_xld(&Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319,
                        "positive");
length_xld(Ellipse,&Length);

Example (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
                       sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)

Example (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
                       sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)

Example (HDevelop)

draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
                        'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
                       sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)

Result

gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXld returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Possible Predecessors

draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipse

Possible Successors

disp_xlddisp_xldDispXldDispXldDispXld, get_points_ellipseget_points_ellipseGetPointsEllipseGetPointsEllipseGetPointsEllipse

Alternatives

gen_circle_contour_xldgen_circle_contour_xldGenCircleContourXldGenCircleContourXldGenCircleContourXld

Module

Foundation