Functions for modifying XSecs of type XS_EDIT_CURVE are defined here.
Click here to return to the main page.
More...
◆ EditXSecConvertTo()
void EditXSecConvertTo |
( |
const string &in |
xsec_id, |
|
|
const int &in |
newtype |
|
) |
| |
Convert the EditCurveXSec curve type to the specified new type. Note, EditCurveXSec uses the same enumerations for PCurve to identify curve type.
string sid =
AddGeom(
"STACK",
"" );
string xsec_1 =
GetXSec( xsec_surf, 1 );
- See also
- PCURV_TYPE
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | newtype | New curve type enum (i.e. CEDIT) |
◆ EditXSecDelPnt()
void EditXSecDelPnt |
( |
const string &in |
xsec_id, |
|
|
const int &in |
indx |
|
) |
| |
Delete an EditCurveXSec control point. Note, cubic Bezier intermediate control points (those not on the curve) cannot be deleted. The previous and next Bezier control point will be deleted along with the point on the curve. Regardless of curve type, the first and last points may not be deleted.
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | indx | Control point index |
◆ EditXSecInitShape()
void EditXSecInitShape |
( |
const string &in |
xsec_id | ) |
|
Initialize the EditCurveXSec to the current value of m_ShapeType (i.e. EDIT_XSEC_ELLIPSE)
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
- See also
- INIT_EDIT_XSEC_TYPE
- Parameters
-
◆ EditXSecSplit01()
int EditXSecSplit01 |
( |
const string &in |
xsec_id, |
|
|
const double &in |
u |
|
) |
| |
Split the EditCurveXSec at the specified U value
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | u | U value to split the curve at (0 - 1) |
- Returns
- Index of the point added from the split
◆ GetEditXSecCtrlVec()
vec3d [] GetEditXSecCtrlVec |
( |
const string &in |
xsec_id, |
|
|
const bool |
non_dimensional = true |
|
) |
| |
Get the control point vector for an EditCurveXSec. Note, the returned array of vec3d values will be represented in 2D with Z set to 0.
string sid =
AddGeom(
"STACK",
"" );
string xsec_1 =
GetXSec( xsec_surf, 1 );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | non_dimensional | True to get the points non-dimensionalized, False to get them scaled by m_Width and m_Height |
- Returns
- Array of control points
◆ GetEditXSecUVec()
double [] GetEditXSecUVec |
( |
const string &in |
xsec_id | ) |
|
Get the U parameter vector for an EditCurveXSec. The vector will be in increasing order with a range of 0 - 1.
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
- Parameters
-
- Returns
- Array of U parameter values
◆ MoveEditXSecPnt()
void MoveEditXSecPnt |
( |
const string &in |
xsec_id, |
|
|
const int &in |
indx, |
|
|
const vec3d &in |
new_pnt |
|
) |
| |
Move an EditCurveXSec control point. The XSec points are nondimensionalized by m_Width and m_Height and defined in 2D, so the Z value of the new coordinate point will be ignored.
string sid =
AddGeom(
"STACK",
"" );
string xsec_1 =
GetXSec( xsec_surf, 1 );
int move_pnt_ind = 3;
vec3d new_pnt =
vec3d( xsec1_pts[move_pnt_ind].x(), 2 * xsec1_pts[move_pnt_ind].y(), 0.0 );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | indx | Control point index |
[in] | new_pnt | Coordinate of the new point |
◆ SetEditXSecPnts()
void SetEditXSecPnts |
( |
const string &in |
xsec_id, |
|
|
double@[] |
u_vec, |
|
|
vec3d@[] |
control_pts |
|
) |
| |
Set the U parameter vector and the control point vector for an EditCurveXSec. The arrays must be of equal length, with the values for U defined in increasing order and range 0 - 1. The XSec is nondimentionalized and 2D, so the input control points wil be scaled by m_Width and m_Height and the Z values will be ignored.
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
xsec2_pts[0] =
vec3d( 1.5, 1.5, 0.0 );
xsec2_pts[1] =
vec3d( 1.5, -1.5, 0.0 );
xsec2_pts[2] =
vec3d( -1.5, -1.5, 0.0 );
xsec2_pts[3] =
vec3d( -1.5, 1.5, 0.0 );
xsec2_pts[4] =
vec3d( 1.5, 1.5, 0.0 );
u_vec[0] = 0.0;
u_vec[1] = 0.25;
u_vec[2] = 0.5;
u_vec[3] = 0.75;
u_vec[4] = 1.0;
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | u_vec | Array of U parameter values |
[in] | control_pts | Array of control points |