Method and system for dynamic generation of pipeline model based on incircle processing

CN123015770APending Publication Date: 2026-10-30HUADE SMART ENERGY MANAGEMENT (TIANJIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611495670.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]因此,本发明的目的在于提供一种基于内切圆处理的管道模型动态生成方法及系统,旨在解决现有纯代码生成三维管道模型时,路径拐点处横截面朝向难以确定导致的模型压缩变形问题,同时提高三维管线模型在运行时动态生成的效率、平滑度与灵活性

Benefits of technology

1、传统方案在拐点处因横截面朝向突变产生挤压变形,本发明从几何根源上采取了双重标准化手段:采用统一向量公式精确计算内切圆圆心与切点,将尖锐拐点替换为连续圆弧过渡点,实现路径走向的光滑无突变;此外还强制规定平滑路径上每个点位横截面的法向必须与该点切线方向严格垂直对齐。这两项手段深度结合,直接带来了“变形问题彻底消除”的显著优势,使得生成的管道在拐点处截面保持正圆形态。彻底根除拐点变形问题,同时保障计算精度与跨平台复用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015770A_ABST
    Figure CN123015770A_ABST
Patent Text Reader

Abstract

The application discloses a pipeline model dynamic generation method and system based on an inscribed circle processing, which first calculates the inscribed circle center and the tangent point of the original path inflection point by using a standardized geometric formula, replaces the sharp inflection point with a continuous circular arc transition point, and realizes path smoothing; then forces the cross-section normal of each point on the smoothed path to be strictly perpendicular to the tangent direction of the point, thereby eliminating the cross-section compression deformation from the geometric root; meanwhile, two-stage abnormal processing logic of path legality checking and inscribed circle radius self-adaptive correction is built in, thereby guaranteeing the stable operation of the algorithm under the boundary parameters. The application can completely solve the model deformation problem at the inflection point, has high operation stability, is standardized in calculation and flexible in expansion, and can be widely applied to the programmed pipeline model generation in the fields of 3D game scenes, virtual simulation, digital twinning and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of 3D engine technology and 3D procedural modeling technology, and in particular to a method and system for dynamically generating pipe models based on inscribed circle processing. Background Technology

[0002] Pipe-like models are extremely common scene elements in 3D game development, industrial simulation, and other content creation. Currently, these models are primarily implemented using the following technologies: 1. Manual Modeling: This method primarily relies on external modeling software such as 3ds Max and Maya to create pipeline models, which are then imported into the Unity engine. This process is cumbersome and inefficient. Modifying paths or parameters requires remodeling and exporting, which cannot meet the needs of dynamic generation and batch production, and is difficult to adapt to dynamically changing paths in games.

[0003] 2. Basic Mesh Generation Method: This method involves placing circular cross-sections at path points using code, then connecting the vertices of adjacent cross-sections to generate a mesh, forming the pipe model. This method works well for generating straight paths with only two nodes, but when dealing with paths with inflection points, it often results in cross-sectional deformation at those points, severely impacting the model's visual appeal and accuracy.

[0004] 3. Single Inflection Point Optimization Scheme: Some improvement schemes only introduce smoothing processing for inflection points, but do not establish a standardized correspondence between inflection point processing and cross-section alignment, nor do they have supporting anomaly handling logic. As a result, there are still problems such as cross-section orientation deviation and unstable operation under extreme parameters, and a reliable industrialized production scheme cannot be formed. Summary of the Invention

[0005] Therefore, the purpose of this invention is to provide a method and system for dynamically generating pipe models based on inscribed circle processing, which aims to solve the problem of model compression and deformation caused by the difficulty in determining the cross-sectional orientation at the path inflection point when generating 3D pipe models using existing pure code, while improving the efficiency, smoothness and flexibility of dynamic generation of 3D pipeline models during runtime.

[0006] To achieve the above objectives, the present invention provides a method for dynamically generating pipe models based on inscribed circle processing, comprising the following steps: S1. Receive pipeline parameters input by the user. The pipeline parameters include: original path point array, pipeline radius R, number of cross-sectional sides Count, and inflection point smoothness coefficient k, 0 < k ≤ 1. S2. With the origin as the center and the radius as the pipe radius R, generate an array of vertices of a standard circular cross-section located in the XY plane based on the number of sides of the cross-section, Count. S3. Preprocess the original path point array and replace each sharp inflection point in the path with a continuous arc transition point using the inscribed circle inflection point smoothing algorithm to generate a smooth pipeline point list with tangent direction. S4. Traverse the smooth pipe point list generated by S3. For each pipe point, perform spatial rotation and translation transformations on the cross-sectional vertex array generated by S2 according to the tangent direction at that point, so that the cross-sectional normal coincides with the tangent direction of the pipe point. Use the transformed cross-sectional vertices as pipe mesh vertices. S5. Connect the corresponding pipe mesh vertices of adjacent cross sections to generate a triangular facet index array, calculate the vertex normals and UV texture coordinates, create a mesh component and assign values, and generate a pipe model in the scene.

[0007] More preferably, in step S2, the specific method for generating the vertex array of the standard circular cross-section is as follows: S201. Create an array with a length of Count, based on the number of sides of the cross section. S202. Calculate the angular interval for each vertex: angle = 360° / Count; S203. With the origin as the center and the radius as the pipe radius R, calculate the vertex coordinates corresponding to each angle in sequence to generate a circular cross-section located in the XY plane.

[0008] More preferably, in step S3, the inscribed circle inflection point smoothing algorithm includes: Steps for determining the center and tangent point: Based on the direction of the angle bisector of the interior angle of the two line segments at the inflection point and the preset inflection point smoothness coefficient k, 0 < k ≤ 1, calculate the coordinates of the center of the inscribed circle, and calculate the coordinates of the tangent point between the inscribed circle and the two line segments based on the coordinates of the center of the inscribed circle and the radius of the inscribed circle. Arc transition point generation steps: Using the center of the inscribed circle as the center coordinate, generate several intermediate transition points on the arc segment between the two tangent points, and connect the tangent points and all intermediate transition points in sequence to form a smooth transition path to replace the original inflection point.

[0009] More preferably, the step of determining the center of the circle and the point of tangency specifically includes: Let the current inflection point be B, the previous path point be A, and the next path point be C. Set the inflection point smoothness coefficient k, where 0 < k ≤ 1. 1) For any intermediate inflection point B, the lengths of the line segments before and after it are respectively , The angle between the line segments is θ; Taking the shortest length of the preceding and following line segments as the benchmark, the shortest benchmark length is... ; 2) Determine the tangent segment length based on the smoothness coefficient: ; 3) Calculate the radius of the inscribed circle from the smoothness coefficient k at the inflection point and the lengths of the preceding and following line segments: ; 4) Calculate the distance from inflection point B to the center O of the inscribed circle: ; 5) Obtain the three-dimensional rectangular coordinates of the center O of the inscribed circle, the three-dimensional rectangular coordinates of the tangent point E on the front line segment BA, and the three-dimensional rectangular coordinates of the tangent point I on the back line segment BC.

[0010] More preferably, the step of generating the arc transition point specifically includes: Calculate the central angle from vector OE to vector OI; The central angle is evenly divided into K+1 parts, and the rotation angle corresponding to each intermediate transition point is calculated in turn. The number of intermediate transition points K is 3, which means that three intermediate transition points, F, G and H, are generated in turn on the arc segment from E to I. With O as the center and elbowR as the radius, the spatial coordinates of each intermediate transition point are calculated sequentially by angle interpolation, and the tangent direction at each intermediate transition point is solved. The tangent direction is perpendicular to the line connecting the point and the center O.

[0011] Further preferably, it also includes anomaly detection and processing, wherein the anomaly detection and processing includes path validity verification and adaptive correction of the inscribed circle radius; Path validity verification specifically includes: when the number of original path points is less than 2, the generation process is terminated and a prompt message is given, and no pipeline model is generated; The adaptive correction of the inscribed circle radius specifically includes: when the calculated inscribed circle radius exceeds the geometric constraints of the path, it is corrected to a preset ratio of the shortest length of the preceding and following line segments.

[0012] More preferably, in step S3, when generating a smooth pipeline point list with tangential directions, the tangential directions of the start and end points are processed as follows: For the starting point P0, calculate the direction vector dir0 = P1 - P0 from the starting point to the next path point P1, and add P0 and the normalized dir0 as tangent direction vectors to the pipeline point list. For the endpoint P n Calculate the previous path point P n-1 To the destination P n Direction vector dir n = P n - P n-1 , will P n and normalized dir n Add it as the tangent direction vector to the pipeline point list.

[0013] More preferably, the UV texture coordinates in S5 are calculated as follows: (1) Distribute the U-axis coordinates evenly along the pipe axis, and allocate the U value according to the cumulative length ratio of the cross section where the vertex is located on the path; (2) Distribute the V-axis coordinates evenly along the circumference of the cross section, and distribute the V value evenly according to the angular position of the vertex on the circumference of the cross section; (3) User-defined UV scaling ratio and offset to adapt to the texture mapping requirements of different texture materials.

[0014] Further preferred features include a real-time dynamic update mechanism: using a script lifecycle method, modifications to the original path point coordinates or generated parameters are detected in real time. When a parameter change is detected, the reconstruction and refresh of the pipeline mesh are automatically triggered, achieving real-time linkage between parameter modification and model update.

[0015] This invention also provides a dynamic generation system for pipe models based on inscribed circle processing, comprising: Parameter input module: Used to receive core parameters input by the user. The core parameters include the original path point array, pipe radius R, cross-sectional side count Count, and inflection point smoothness coefficient k (value 0~1). Cross-section generation module: Used to generate an array of vertices of a standard circular cross-section located in the XY plane, centered at the origin and with a radius equal to the pipe radius R, based on the number of sides of the cross-section, Count. Path smoothing module: Used to preprocess the original path points, and replace each sharp inflection point in the path with a continuous arc transition point through the inscribed circle inflection point smoothing algorithm, generating a list of smooth pipe points with tangential direction; Mesh vertex calculation module: used to traverse the smooth pipe point list, and perform spatial rotation and translation transformation on the cross-section vertex array for each pipe point according to the tangent direction, so that the cross-section normal coincides with the tangent direction of the pipe point, thus obtaining the pipe mesh vertex; Mesh generation and rendering module: used to connect the corresponding vertices of adjacent cross sections to generate a triangular facet index array, calculate vertex normals and UV texture coordinates, create mesh components and assign values, and generate pipeline models in the scene.

[0016] The present application discloses a method and system for dynamically generating pipe models based on inscribed circle processing, which has at least the following advantages compared with the prior art: 1. Traditional solutions suffer from compression deformation at inflection points due to abrupt changes in cross-sectional orientation. This invention addresses this by employing a dual standardization approach at the geometric root: First, it uses a unified vector formula to accurately calculate the center and tangent point of the inscribed circle, replacing sharp inflection points with continuous circular arc transition points, achieving a smooth, abrupt path. Second, it mandates that the normal vector of the cross-section at each point on the smooth path must be strictly perpendicularly aligned with the tangent direction at that point. This deep integration of the two methods directly results in the significant advantage of "completely eliminating deformation problems," ensuring that the generated pipe maintains a perfectly circular cross-section at inflection points. This completely eradicates inflection point deformation while simultaneously guaranteeing computational accuracy and cross-platform reusability.

[0017] 2. High operational stability: This invention sets up processing logic for two typical abnormal scenarios, namely insufficient path points and excessive inscribed circle radius, respectively, to provide prompt termination and adaptive correction, ensuring that the algorithm does not crash or generate erroneous models under extreme parameters; the two-level abnormal handling mechanism covers boundary parameter scenarios and is adapted to the needs of industrial batch generation.

[0018] 3. Standardized calculation: All inflection point geometric calculations are supported by clear formulas, with controllable accuracy and strong reusability across projects and engines.

[0019] 4. High scalability and flexibility: The core solution incorporates multiple additional functions such as parametric mapping, real-time updates, and UV unwrapping to adapt to customized needs in different scenarios. UV coordinates are automatically assigned based on the pipe's axial circumference and cross-sectional circumference, and custom scaling and offset are supported. This method precisely solves the defects of texture stretching in traditional procedural modeling, ensuring that textures maintain a uniform and distortion-free visual effect even on complex curved paths. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the method for dynamically generating pipe models based on inscribed circle processing provided by the present invention.

[0021] Figure 2 This is a flowchart illustrating the specific generation process of the pipeline model dynamic generation in this invention.

[0022] Figure 3 This is a geometric schematic diagram of the inscribed circle inflection point smoothing algorithm of the present invention. Detailed Implementation

[0023] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] like Figure 1 As shown, one embodiment of the present invention provides a method for dynamically generating a pipe model based on inscribed circle processing, comprising the following steps: S1. Receive pipe parameters input by the user, the pipe parameters including: original path point array, pipe radius R, number of cross-sectional sides Count, and inflection point smoothness coefficient k (value 0~1); wherein: The original path point array is of type Vector3 and is used to define the overall direction of the pipeline; the number of sides of the cross section Count is used to control the smoothness of the pipeline; the radius of the inscribed circle at each point elbowR is used to control the degree of curvature at the inflection point. S2. Centered on the origin and with a radius equal to the pipe radius R, generate an array of vertices for a standard circular cross-section located in the XY plane based on the number of sides (Count). Specifically, the method for generating the array of vertices for the standard circular cross-section is as follows: S201. Create an array with a length of Count, based on the number of sides of the cross section. S202. Calculate the angular interval for each vertex: angle = 360° / Count; S203. With the origin as the center and the radius as the pipe radius R, calculate the vertex coordinates corresponding to each angle in sequence to generate a circular cross-section located in the XY plane.

[0025] S3. Preprocess the original path point array and replace each sharp inflection point in the path with a continuous arc transition point using the inscribed circle inflection point smoothing algorithm to generate a smooth pipeline point list with tangent direction. The inscribed circle inflection point smoothing algorithm includes: S301, Steps for determining the center and tangent point: Based on the direction of the angle bisector of the interior angle of the two line segments at the inflection point and the radius of the inscribed circle, calculate the coordinates of the center of the inscribed circle, and based on the coordinates of the center of the inscribed circle and the radius of the inscribed circle, calculate the coordinates of the tangent point between the inscribed circle and the two line segments. The steps for determining the center of the circle and the point of tangency specifically include: Let the current inflection point be B, the previous path point be A, and the next path point be C. Set the inflection point smoothness coefficient k, where k takes a value of 0 to 1. All points in space are represented using three-dimensional rectangular coordinates (x, y, z), and vectors are uniformly represented using three components.

[0026] (1) Arbitrary inflection point: B(x) B ,y B ,z B ); (2) The path point preceding the inflection point: A(x) A ,y A ,z A ); (3) The next path point after the inflection point: C(x) C ,y C ,z C ); (4) Inflection point smoothness coefficient k (0 < k ≤ 1); Calculate the vector of the front line segment BA: Vector of line segment BC: ; Calculate the length of BA: ; BC length: ; Minimum reference length: ; Forward unit vector (Along B→A): ; Backward unit vector (Along B→C): ; Calculate the interior angle (in radians) at the inflection point: ; Standard length of tangent segment: ; The radius of the inscribed circle that adapts to the current inflection point: ; Angle bisector vector : ; Magnitude of the vector of the interior angle bisector: ; Angle bisector unit vector : ; Calculate the distance from inflection point B to the center O of the inscribed circle: ; The three-dimensional rectangular coordinates of the inscribed circle's center O are: ; The three-dimensional rectangular coordinates of the point of tangency E on the front line segment BA are: ; The three-dimensional rectangular coordinates of the point of tangency I on line segment BC are: ; Wherein, the direction of the tangent at point E is... Consistent, the direction of the tangent at point I is the same as... Consistent.

[0027] S302, Arc Transition Point Generation Steps: Using the center of the inscribed circle as the center coordinate, generate several intermediate transition points on the arc segment between the two tangent points. Connect the tangent points and all intermediate transition points sequentially to form a smooth transition path to replace the original inflection points. For ease of understanding, the following method is used... Figure 3 The geometric diagram shown illustrates the steps for generating the arc transition point, which specifically include: Calculate the central angle from vector OE to vector OI; The central angle is evenly divided into K+1 parts, and the rotation angle corresponding to each intermediate transition point is calculated in turn. The number of intermediate transition points K is 3, which means that three intermediate transition points, F, G and H, are generated in turn on the arc segment from E to I.

[0028] With O as the center and elbowR as the radius, the spatial coordinates of each intermediate transition point are calculated sequentially by angle interpolation, and the tangent direction at each intermediate transition point is solved. The tangent direction is perpendicular to the line connecting the point and the center O.

[0029] In step S3, when generating a smooth pipeline point list with tangential directions, the tangential directions of the start and end points are processed as follows: For the starting point P0, calculate the direction vector dir0 = P1 - P0 from the starting point to the next path point P1, and add P0 and the normalized dir0 as tangent direction vectors to the pipeline point list. For the endpoint P n Calculate the previous path point P n-1 To the destination P n Direction vector dir n = P n - P n-1 , will P n and normalized dir n Add it as the tangent direction vector to the pipeline point list.

[0030] S4. Traverse the smooth pipe point list generated by S3. For each pipe point, perform spatial rotation and translation transformations on the cross-sectional vertex array generated by S2 according to the tangent direction at that point, so that the cross-sectional normal coincides with the tangent direction of the pipe point. Use the transformed cross-sectional vertices as pipe mesh vertices. (1) Traverse all the optimized pipe points in the third step, calculate the tangent direction and normal vector of the point, and determine the orientation of the cross section.

[0031] (2) Calculate the tangent direction at each pipe point (i.e., the tangent direction of the inscribed circle or the direction of the straight line segment).

[0032] (3) The array of cross-section circle vertices established in the second step is transformed by spatial rotation and translation according to the tangent direction and placed at the position of the current path point, so as to obtain all the mesh vertices of the pipeline model in three-dimensional space.

[0033] (4) Add the transformed cross-section vertices to the total vertex array of the pipeline.

[0034] S3, through the inscribed circle's circular arc transition, transforms the abrupt change in tangent direction at the original inflection point into a continuous variation, providing a continuous and usable tangent direction for S4. S4, in turn, forces the normal of each cross-section to be strictly aligned with the tangent direction at that point, ensuring the cross-section rotates continuously with the tangent and preventing abrupt changes in cross-section orientation at the inflection point. Without S3, the tangent at the inflection point is discontinuous, and even with forced alignment, the cross-section will momentarily flip. Without S4, cross-sections on the smooth path may still be oriented incorrectly. Only by combining these two techniques can the geometrically fundamental principle be guaranteed that the cross-section at the inflection point maintains a perfectly circular shape, completely eliminating compressive deformation.

[0035] S5. Connect the corresponding pipe mesh vertices of adjacent cross sections to generate a triangular facet index array, calculate the vertex normals and UV texture coordinates, create a mesh component and assign values, and generate a pipe model in the scene.

[0036] The UV texture coordinates in S5 are calculated as follows: (1) Distribute the U-axis coordinates evenly along the pipe axis, and allocate the U value according to the cumulative length ratio of the cross section where the vertex is located on the path; (2) Distribute the V-axis coordinates evenly along the circumference of the cross section, and distribute the V value evenly according to the angular position of the vertex on the circumference of the cross section; (3) User-defined UV scaling ratio and offset to adapt to the texture mapping requirements of different texture materials.

[0037] It also includes anomaly detection and handling, which includes path validity verification and adaptive correction of the inscribed circle radius; Path validity verification specifically includes: when the number of original path points is less than 2, the generation process is terminated and a prompt message is given, and no pipeline model is generated; The adaptive correction of the inscribed circle radius specifically includes: when the calculated inscribed circle radius exceeds the geometric constraints of the path, it is corrected to a preset ratio of the shortest length of the preceding and following line segments.

[0038] The adaptive correction of the inscribed circle radius specifically includes: 1) Calculate the length of the tangent segment at the current inflection point. Then, determine whether the sum of the lengths of the tangent segments at the adjacent inflection points is greater than the length of the straight line segment between them; 2) If it is greater than, then the length of the tangent segment at the current inflection point will be reduced proportionally. Alternatively, reduce the smoothness coefficient k until the sum of the tangent segments before and after the inflection point is less than or equal to the adjacent line segments. 3) Based on the revised Recalculate the radius of the inscribed circle ; 4) If the corrected radius is still less than the preset minimum value, skip the inflection point and provide a prompt.

[0039] It also includes a real-time dynamic update mechanism: through the script lifecycle method, it detects changes in the original path point coordinates or generated parameters in real time. When a parameter change is detected, it automatically triggers the reconstruction and refresh of the pipeline mesh, realizing real-time linkage between parameter modification and model update.

[0040] This invention also provides a dynamic generation system for pipe models based on inscribed circle processing, used to implement the above-mentioned dynamic generation method for pipe models based on inscribed circle processing, including: Parameter input module: Used to receive core parameters input by the user. The core parameters include the original path point array, pipe radius R, cross-sectional side count Count, and inflection point smoothness coefficient k (value 0~1). Cross-section generation module: Used to generate an array of vertices of a standard circular cross-section located in the XY plane, centered at the origin and with a radius equal to the pipe radius R, based on the number of sides of the cross-section, Count. Path smoothing module: Used to preprocess the original path points, and replace each sharp inflection point in the path with a continuous arc transition point through the inscribed circle inflection point smoothing algorithm, generating a list of smooth pipe points with tangential direction; Mesh vertex calculation module: used to traverse the smooth pipe point list, and perform spatial rotation and translation transformation on the cross-section vertex array for each pipe point according to the tangent direction, so that the cross-section normal coincides with the tangent direction of the pipe point, thus obtaining the pipe mesh vertex; Mesh generation and rendering module: used to connect the corresponding vertices of adjacent cross sections to generate a triangular facet index array, calculate vertex normals and UV texture coordinates, create mesh components and assign values, and generate pipeline models in the scene.

[0041] The specific implementation process is as follows: Figure 2 As shown, the process includes the following: Start: Get the raw path point array and pipeline parameters.

[0042] Step 2: Perform a validity check to determine if the number of path points is ≥2.

[0043] No (Not satisfied): Output an error message and end the process.

[0044] Yes (satisfied): Proceed to the next preprocessing step.

[0045] Step 3: Data preprocessing (parallel execution) During this phase, three core operations are performed simultaneously to prepare the geometric data for building the pipeline: 3a. Section generation: Create an array of vertices for the pipe cross section.

[0046] 3b. Path smoothing: Use the inscribed circle algorithm to process all inflection points and generate a smooth path.

[0047] 3c. Vector calculation: Calculate the tangent direction and normal vector for each path point.

[0048] Step 4: Mesh vertex calculation. Combine the data generated in Step 3 to calculate the transformed pipeline mesh vertex array.

[0049] Step 5: Mesh information generation. Based on the obtained mesh vertex array, generate the corresponding basic mesh information: 5a. Index generation: Generates an array of triangular indices for the pipe mesh.

[0050] 5b. Material coordinate generation: Calculate the normal direction and UV texture coordinate array for each vertex.

[0051] Step 6: Create a Mesh component and assign the data generated in Step 5 (vertex array, triangle index array, normal array, and UV array) to the component.

[0052] Step 7: Render the model Create a MeshFilter component, assign the pre-defined Mesh component to the MeshFilter, and thus complete the rendering of the pipeline model.

[0053] Step 8: Dynamically update monitoring Determine if "parameters or waypoints have changed?" Yes: Trigger update, process loop returns to step 3 (re-perform cross-section generation, path smoothing and vector calculation).

[0054] No: Process ended.

[0055] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for dynamically generating pipe models based on inscribed circle processing, characterized in that, Includes the following steps: S1. Receive pipeline parameters input by the user, the pipeline parameters including: original path point array, pipeline radius R, cross-sectional side count Count, and inflection point smoothness coefficient k; S2. With the origin as the center and the radius as the pipe radius R, generate an array of vertices of a standard circular cross-section located in the XY plane based on the number of sides of the cross-section, Count. S3. Preprocess the original path point array and replace each sharp inflection point in the path with a continuous arc transition point using the inscribed circle inflection point smoothing algorithm to generate a smooth pipeline point list with tangent direction. S4. Traverse the smooth pipe point list generated by S3. For each pipe point, perform spatial rotation and translation transformations on the cross-sectional vertex array generated by S2 according to the tangent direction at that point, so that the cross-sectional normal coincides with the tangent direction of the pipe point. Use the transformed cross-sectional vertices as pipe mesh vertices. S5. Connect the corresponding pipe mesh vertices of adjacent cross sections to generate a triangular facet index array, calculate the vertex normals and UV texture coordinates, create a mesh component and assign values, and generate a pipe model in the scene.

2. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, In step S2, the specific method for generating the vertex array of the standard circular cross-section is as follows: S201. Create an array with a length of Count, based on the number of sides of the cross section. S202. Calculate the angular interval for each vertex: angle = 360° / Count; S203. With the origin as the center and the radius as the pipe radius R, calculate the vertex coordinates corresponding to each angle in sequence to generate a circular cross-section located in the XY plane.

3. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, In S3, the inscribed circle inflection point smoothing algorithm includes: Steps for determining the center and tangent point: Based on the direction of the angle bisector of the interior angle of the two line segments at the inflection point and the radius of the inscribed circle, calculate the coordinates of the center of the inscribed circle, and based on the coordinates of the center of the inscribed circle and the radius of the inscribed circle, calculate the coordinates of the tangent point between the inscribed circle and the two line segments; Arc transition point generation steps: Using the center of the inscribed circle as the center coordinate, generate several intermediate transition points on the arc segment between the two tangent points, and connect the tangent points and all intermediate transition points in sequence to form a smooth transition path to replace the original inflection point.

4. The method for dynamically generating pipe models based on inscribed circle processing according to claim 3, characterized in that, The steps for determining the center of the circle and the point of tangency specifically include: Let the current inflection point be B, the previous path point be A, and the next path point be C. Set the inflection point smoothness coefficient k, where 0 < k ≤ 1. 1) For any intermediate inflection point B, the lengths of the line segments before and after it are respectively , The angle between the line segments is θ; Taking the shortest length of the preceding and following line segments as the benchmark, the shortest benchmark length is... ; 2) Determine the tangent segment length based on the smoothness coefficient: ; 3) Calculate the radius of the inscribed circle from the smoothness coefficient k at the inflection point and the lengths of the preceding and following line segments: ; 4) Calculate the distance from inflection point B to the center O of the inscribed circle: ; 5) Obtain the three-dimensional rectangular coordinates of the center O of the inscribed circle, the three-dimensional rectangular coordinates of the tangent point E on the front line segment BA, and the three-dimensional rectangular coordinates of the tangent point I on the back line segment BC.

5. The method for dynamically generating pipe models based on inscribed circle processing according to claim 4, characterized in that, The specific steps for generating the arc transition point include: Calculate the central angle from vector OE to vector OI; Based on the number K of intermediate transition points, the central angle is evenly divided into K+1 parts, and the rotation angle corresponding to each intermediate transition point is calculated in turn. With O as the center and elbowR as the radius, the spatial coordinates of each intermediate transition point are calculated sequentially by angle interpolation, and the tangent direction at each intermediate transition point is solved. The tangent direction is perpendicular to the line connecting the point and the center O.

6. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, It also includes anomaly detection and handling, which includes path validity verification and adaptive correction of the inscribed circle radius; Path validity verification specifically includes: when the number of original path points is less than 2, the generation process is terminated and a prompt message is given, and no pipeline model is generated; The adaptive correction of the inscribed circle radius specifically includes: when the calculated inscribed circle radius exceeds the geometric constraints of the path, it is corrected to a preset ratio of the shortest length of the preceding and following line segments.

7. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, In step S3, when generating a smooth pipeline point list with tangential directions, the tangential directions of the start and end points are processed as follows: For the starting point P0, calculate the direction vector dir0 = P1 - P0 from the starting point to the next path point P1, and add P0 and the normalized dir0 as tangent direction vectors to the pipeline point list. For the endpoint P n Calculate the previous path point P n-1 To the destination P n Direction vector dir n = P n - P n-1 , will P n and normalized dir n Add it as the tangent direction vector to the pipeline point list.

8. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, The UV texture coordinates in S5 are calculated as follows: (1) Distribute the U-axis coordinates evenly along the pipe axis, and allocate the U value according to the cumulative length ratio of the cross section where the vertex is located on the path; (2) Distribute the V-axis coordinates evenly along the circumference of the cross section, and distribute the V value evenly according to the angular position of the vertex on the circumference of the cross section; (3) User-defined UV scaling ratio and offset to adapt to the texture mapping requirements of different texture materials.

9. The method for dynamically generating pipe models based on inscribed circle processing according to claim 1, characterized in that, It also includes a real-time dynamic update mechanism: through the script lifecycle method, it detects changes in the original path point coordinates or generated parameters in real time. When a parameter change is detected, it automatically triggers the reconstruction and refresh of the pipeline mesh, realizing real-time linkage between parameter modification and model update.

10. A dynamic generation system for pipe models based on inscribed circle processing, characterized in that, include: Parameter input module: used to receive core parameters input by the user. The core parameters include the original path point array, pipe radius R, cross-sectional side count Count, and inflection point smoothness coefficient k, where 0 < k ≤ 1. Cross-section generation module: Used to generate an array of vertices of a standard circular cross-section located in the XY plane, centered at the origin and with a radius equal to the pipe radius R, based on the number of sides of the cross-section, Count. Path smoothing module: Used to preprocess the original path points, and replace each sharp inflection point in the path with a continuous arc transition point through the inscribed circle inflection point smoothing algorithm, generating a list of smooth pipe points with tangential direction; Mesh vertex calculation module: used to traverse the smooth pipe point list, and perform spatial rotation and translation transformation on the cross-section vertex array for each pipe point according to the tangent direction, so that the cross-section normal coincides with the tangent direction of the pipe point, thus obtaining the pipe mesh vertex; Mesh generation and rendering module: used to connect the corresponding vertices of adjacent cross sections to generate a triangular facet index array, calculate vertex normals and UV texture coordinates, create mesh components and assign values, and generate pipeline models in the scene.