Adding Edges
Functions Introduced:
If the import feature to be created requires any edge information, then call the functions list above in sequence, else skip this section.
Use the function ProEdgedataAlloc() to allocate memory for the edge data structure. After initialization, this data will be appended to the interface data.
Use the function ProEdgedataInit() to initialize the edge data structure. The following are the input arguments:
edge_id — Specifies a unique identifier of the edge.
edge_surf_ids—Specifies the ID of the surfaces on either side of the edge.
edge_directions —Specifies the edge directions on the surface.
edge_uv_point_arr —Specifies an array of UV points on the surfaces. The value can be NULL.
p_edge_uv_curve_data—Specifies the edge UV curves on the surfaces. The value can be NULL.
p_edge_curve_data—Specifies the curve data handle in the form of the ProCurvedata structure. This data handle is returned by the functions ProLinedataInit(), ProArcdataInit(), ProEllipsedataInit(), ProSplinedataInit(), or ProBsplinedataInit(). Use the function ProCurvedataFree to free the ProCurvedata data handle.
Note:
 
PTC recommends that you split the closed loop edge into two or more continuous edges while specifying the inputs to the function ProEdgedataInit(). For example, to create a circular edge, instead of specifying the start angle as 0 and the end angle as 360, split the circular edge into 2 or more edges. The angular measurements of the split edges could be 0 to 30 for the first split and 30 to 360 for the second split. The function ProEdgedataInit() must be called for each split.
Use the function ProCurvedataAlloc() to allocate memory for the curve data structure. The curve data structure defines the edge profile.
Depending on the type of curve specified for the edge, call one of the following functions to initialize the curve data.
Use the function ProLinedataInit() to initialize the line data structure. Specify the start of the line and end of the line as inputs of this function.
Use the function ProArcdataInit() to initialize an arc data structure. The input arguments of this function are:
vector1—Specifies the first vector of the arc coordinate system.
vector2—Specifies the second vector of the arc coordinate system.
origin—Specifies the center of the arc coordinate system
start_angle—Specifies the starting angle (in radians) of the arc.
end_angle —Specifies the end angle (in radians) of the arc.
radius —Specifies the radius of the arc.
Use the function ProEllipsedataInit() to initialize an ellipse data structure. The input arguments of this function are:
center—Specifies the center of the ellipse.
x_axis—Specifies the first (x) axis vector of the ellipse.
plane_normal—Specifies the axis vector that is normal to the plane of the ellipse.
x_radius—Specifies the radius of the ellipse in the direction of ‘x’ axis.
y_radius—Specifies the radius of the ellipse in the direction of ‘y’ axis. The ‘y’ axis can be found as a vector product of the plane_normal on x_axis.
start_ang—Specifies the starting angle (in radians) of the ellipse.
end_ang—Specifies the end angle (in radians) of the ellipse.
Use the function ProSplinedataInit() to initialize the spline data structure. The input arguments of this function are:
par_arr —Specifies an array of spline parameters
pnt_arr—Specifies an array of spline interpolant points
tan_arr—Specifies an array of tangent vectors at each point
num_points—Specifies the size for all the arrays
Use the function ProBsplinedataInit() to initialize the B-spline data structure. The input arguments of this function are:
degree—Specifies the degree of the basis function.
params —Specifies an array of knots on the parameter line.
weights —In the case of rational B-splines, it specifies an array of the same dimension as the array of c_pnts. Else, the value of this argument is NULL.
c_pnts—Specifies an array of knots on control points.
num_knots—Specifies the size of the params array.
num_c_points—Specifies the size of the c_pnts and the size of weights if it is not NULL.
Note:
 
Although ProBsplinedataInit() returns B-spline curves, these curves are interpreted as spline curves in the ProIntData data structure used by the function ProImportfeatCreate() while creating the import feature.
The values PRO_TK_BSPL_UNSUITABLE_DEGREE and PRO_TK_BSPL_NON_STD_END_KNOTS returned by ProBsplinedataInit() should be treated as warnings. These values indicate that the geometry finally imported in is different from the geometry initially supplied to the function. The geometry is not rejected by ProBsplinedataInit() and is used to generate the ProCurvedata data structure.
Appending the Edge Data to the Interface Data
Function Introduced:
Use the function ProIntfDataEdgeAppend() to append the edge data into the interface data.
Repeat the sequence for each edge required by the import feature.
È stato utile?