Description of the functional module of the NURBS curvature filling hole

This function is encapsulated in a library function called ResurfNurbs. The ResurfNurbs library function provides a function to supplement a hole with a NURBS curvature for certain geometrys. The NURBS curvature fills the hole and reaches the G1 line of the hole. The ResurfNurbs library function provides a continuous G0/G1 numerical report.

Figure 1 below is a geometric model with holes:

Figure 1

(Chart 1)

Figure 2 picks up the blue hole boundary line as an input parameter to generate the NURBS curve:

Figure 2

(Chart 2)

Figure 3 generated a cut of the NRUBS curve fill hole:

Figure 3

(Chart 3)

Figure 4 is a continuous G1 deviation report on the public boundary line between a hole NURBS and the adjacent NURBS curve.

Figure 4

(Chart 4)

ResurfNurbs library functionIt can generate a tailoring face to fill a hole, and a non-cutted quadrilateral to fill a hole. Specifically, a curve of that type fills a hole, and the user can choose from the form of the hole boundary.

 

API Call Process

Called API must be strictly enforced in the following form:

Step 1: Initialize I don't know. Call RsFillHoleByNurbs Start() for initialization;

Step 2: Enter boundary line I don't know. Call RsFilillHoleByNurbs AppendBundaryCurve() to add a 3D curve or call RsFilillHoleByNurbs AppendSurfaceEdge() to add a curved boundary line. These boundary lines must be enclosed in a closed circle, and their end-ends and end-points should not be too close.

Step 3: Parameter Settings I don't know. Call RsFilleHoleByNurbs SetSmoothFactor() to set a curved smoothness.

Step 4: Parameter Settings I don't know. Call RsFilleHoleByNurbs SetDrapSurfaceType() to set the type of the curve;

Step 5: Generate Curve I don't know. Call RsFilillHoleByNurbs DoFill() to perform side-generated production;

Step 6: Fetch generated curve data I don't know. Call RsFillHoleByNurbs GetNurbs() to get a generated NURBS curve;

Step 7: If you generate a cropping face, get the data on the boundary curve I don't know. Call RsFilillHoleByNurbs Get2DTrimmingCurveCount() to get the number of curves on the cropring; call RsFilillHoleByNurbs Get2DTrimmingCurve() to get the data on the Article I 2D Boundary Line; call RsFilillHoleByNurbs Get3DTrimmingCurve() to get the data on the Article I 3D Line;

Step 8: Get a continuity report on the new curve boundary lineI don't know. Call RsFilillHoleByNurbs GetMaxG1ReportData (double** point x, double** point y, double** point**point z, double**angles, int* point num); RsFilleByNurbs GetG1ReportData (double** point x, double** point y, double**.double**angles, int* point**mint num; RsFilleHelbyNubs Get GpotMaxG0ReportData (double**point x, double**dob**doublint**gim Goint Gunit Gbut Dou.

Step9 : End Call 。 RsFillHoleByNurbs_End() 。

 

API Parameter Description

  extern "C" __declspec(dllimport) void RsFillHoleByNurbs_Start();

Functions: Initialization. The interface is the function that must be first called.

Parameters: The interface does not have parameters.

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_AppendBoundaryCurve(double* cpx, double* cpy, double* cpz, double* weight, int ctrlp_num, int is_rational, int degree, double* knot);

Functions: Add a 3D NURBS curve as a boundary line. 3D NURBS curve refers to a space curve that is not on the curve.

Enter parameter description:

Figure 5. Green to 3D curve

(Figure 5. Green 3D curve)

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_AppendSurfaceEdge(double* cpu, double* cpv, double* curve_weight, int ctrlp_num, int is_curve_rational, int degree, double* knot,int iso_type, int continuity, int hasface, double* surf_cpx, double* surf_cpy, double* surf_cpz, double* surf_weight, int u_num, int v_num, int is_surf_rational, int u_degree, int v_degree, double* u_knot, double* v_knot);

Functions: Add a curve (surface Edge) as a boundary line. Curved boundary curve (surface Edge) refers to a curve that falls on the curve and is defined by a two-dimensional curve in the space of the 2D parameters of a curve.

Enter parameter description:

Parameters contain two parts: the NURBS curve data and the NURBS curve data.

NURBS Curve Data:

Data on curved boundary curves :

Figure 6. Blue curve (surface edge)

(Figure 6. Blue curve (surface edge))

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_SetSmoothFactor(double factor);

Functions: control the smoothness of the new face.

Enter parameter description:

(a) double factor: [0.0001,1.0] values between the larger and smoother;

 

extern "C" __declspec(dllimport) void void RsFillHoleByNurbs_SetDrapSurfaceType(int type);

Functions: Sets the surface construction direction, according to the selected construction mode, and specifies whether the resulting surface is trimmed.

Enter parameter description:

int type:

Figure 7. Filling holes in blue curves with tailor face Hole

(Figure 7. The blue curve fills a hole with a tailor face)

 

Figure 8. Fill holes in the blue curve with non-reciprocal face Hole

(Figure 8. The blue curve fills a hole with a non-heared face)

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_DoFill();

Functions: Execute curve generation.

 

 

extern "C" __declspec(dllimport) bool RsFillHoleByNurbs_GetNurbs(int* u_num, int* v_num, int* u_degree, int* v_degree, double** u_knot, double** v_knot, double** cpx, double** cpy, double** cpz);

Functions: Get data on the new NURBS curve.

Description of output parameters:

 

 

 

extern "C" __declspec(dllimport) int RsFillHoleByNurbs_Get2DTrimmingCurveCount();

Functions: returns the number of border lines for the new cropping face. If the new curve is the non-cuted side, the number is 0, and if the cropped side, these boundary curves form a boundary ring. Each border curve can be retrieved from the 3D curve in the position of the 2D curve and the physical curve.

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_Get2DTrimmingCurve(int index, int* ctrlp_num, int* degree, double** knot, double** cpu, double** cpv);

Functions: given index, removes the 2D curve data from the boundary ring.

Output Parameters:

Data of curved boundary curve:

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_Get3DTrimmingCurve(int index, int* ctrlp_num, int* degree, double** knot, double** cpx, double** cpy, double** cpz);

Functions: given index, remove the 3D curve data from the boundary ring.

Output Parameters:

Data of curved boundary curve:

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_End();

Functions: End curve generation.

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_Clear();

Functions: Clear all data, reset.

 

extern "C" __declspec(dllimport) bool RsFillHoleByNurbs_GetStatus();

Functions: See if a curve is successfully generated.

Return value:

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_GetMaxG1ReportData(double** point_x, double** point_y, double** point_z, double** angles, int* point_num);

Functions: Report the largest G1 continuous deviation angle on each segment of the boundary in a state of successful curve generation. If the boundary line is a curved curve, there is a continuous G1 angle deviation; if the boundary line is a 3D curve, there is no continuous G1 angle deviation.

Output Parameters:

Figure 9

(Chart 9)

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_GetG1ReportData(double** point_x, double** point_y, double** point_z, double** angles, int* point_num);

Functions: Report the largest continuous G1 deviation angle at a number of discrete points on the curved boundary line in a state of successful curve generation. If the border line is a curved curve, there is a continuous G1 angle deviation; if the border line is a 3D curve, there is no continuous G1 angle deviation.

Output Parameters:

 

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_GetMaxG0ReportData(double** point_x, double** point_y, double** point_z, double** deviation, int* point_num);

Functions: The largest G0 continuous distance deviation is reported for each section of the boundary line in a state of success in generating a curve. Each line of the curve, whether a curve or a 3D curve, has a G0 continuous distance deviation value.

Output Parameters:

 

Figure 10

(Chart 10)

 

extern "C" __declspec(dllimport) void RsFillHoleByNurbs_GetG0ReportData(double** point_x, double** point_y, double** point_z, double** deviation, int* point_num);

Functions: Report a G0 continuous distance deviation at a number of discrete points on the boundary line in a state of success in generating a curve. Each line on the curve, whether a curve or a 3D curve, has a G0 continuous distance deviation value.

Output Parameters:

Back to top