A three-dimensional modeling method, device and equipment of a slope pipeline and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PLANT RESOURCE TECH CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-29
Smart Images

Figure CN121661263B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical digital data processing, and in particular to a three-dimensional modeling method, apparatus, device, and storage medium for sloped pipes. Background Technology
[0002] In engineering design, pipeline systems serve as the core carriers for media transmission, and the efficiency and accuracy of their 3D modeling directly impact the overall construction quality, cost control, and ease of subsequent operation and maintenance. Among these, sloped pipelines are widely used in gravity flow drainage systems, steam pipeline condensate drainage systems, and other scenarios. By pre-setting the slope, they ensure smooth media flow and prevent problems such as liquid accumulation and blockages, making them an indispensable and crucial component of industrial pipeline design.
[0003] In related technologies, the process of 3D modeling of sloped pipes usually requires the creation of a large number of auxiliary lines, auxiliary surfaces, or auxiliary points. For example, the precise coordinates of the pipe insertion point in 3D space are first calculated, and then the key model is moved and rotated to that position. The pipe is then rotated so that its axis is precisely aligned with the axis of the sloped pipe, thus obtaining the final 3D model of the sloped pipe. This process is cumbersome and the efficiency of generating the 3D model of the sloped pipe is low. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for 3D modeling of sloped pipelines, solving the problems of cumbersome modeling processes and low efficiency in generating 3D model diagrams of sloped pipelines. Based on the obtained 3D coordinates of the starting point, the ending point, pipe fitting identifiers, and distance values of pipe fittings, the method directly determines the positioning coordinates and orientation vectors of the fittings. These coordinates and orientation vectors are then input into a preset 3D model of the sloped pipeline to obtain a 3D model diagram of the sloped pipeline. This eliminates the need to generate numerous auxiliary parameters or perform further rotation and alignment processing on the generated 3D model, significantly improving the efficiency of generating 3D model diagrams of sloped pipelines.
[0005] In a first aspect, embodiments of this application provide a three-dimensional modeling method for sloped pipes, comprising:
[0006] Obtain the three-dimensional coordinates of the starting point and the ending point of the sloped pipeline, the pipe fitting identifier, and the distance value of the pipe fitting. Generate a unit direction vector based on the three-dimensional coordinates of the starting point and the ending point.
[0007] The pipe fitting is located based on the unit direction vector, the distance value of the pipe fitting, and the three-dimensional coordinates of the starting point. The fitting location coordinates are then determined based on the processing results.
[0008] The pipe fitting orientation is performed based on the unit direction vector, the pipe fitting identifier, and the reference direction in the preset world coordinate system. The fitting orientation vector is then determined based on the processing result.
[0009] The three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the orientation vector of the accessory, the positioning coordinates of the accessory, and the identifier of the pipe fitting are input into a preset three-dimensional model to obtain a three-dimensional model of the sloped pipe.
[0010] Optionally, the step of performing pipe fitting orientation processing based on the unit direction vector, the pipe fitting identifier, and the reference direction in the preset world coordinate system, and determining the fitting orientation vector based on the processing result, includes:
[0011] The working condition type of the sloped pipeline is determined based on the unit direction vector. The working condition type, the pipe fitting identifier, and the reference direction of the preset world coordinate system are combined to generate search keywords.
[0012] Based on the search keywords, a target orientation constraint list is retrieved from the preset constraint list, and auxiliary direction vectors and alternative direction vectors are extracted from the target orientation constraint list;
[0013] The auxiliary direction vector is normalized and verified based on the preset anchor point. The functional direction vector is determined according to the verification result. The functional direction vector is either the auxiliary direction vector or the alternative direction vector. The unit direction vector and the functional direction vector are determined as the attachment orientation vector.
[0014] Optionally, determining the operating condition type of the sloped pipeline based on the unit direction vector includes:
[0015] The tilt angle of the sloped pipeline is calculated based on the unit direction vector. The tilt angle is compared with the angle threshold corresponding to each preset working condition type. The working condition type is determined based on the comparison result.
[0016] Optionally, the preset anchor points include safety anchor points, conflict anchor points, and standard anchor points;
[0017] Accordingly, the step of performing a normalization check on the auxiliary direction vector based on a preset anchor point, and determining the functional direction vector based on the check result, includes:
[0018] The auxiliary direction vector is compared with the coordinate ranges of the safety anchor point, the conflict anchor point, and the standard anchor point, respectively, and the standardization verification of the auxiliary direction vector is performed based on the comparison results.
[0019] If the auxiliary direction vector satisfies the normative verification conditions, the auxiliary direction vector is determined as the functional direction vector; if the auxiliary direction vector does not satisfy the normative verification conditions, the alternative direction vector is determined as the functional direction vector.
[0020] Optionally, the step of performing pipe fitting orientation processing based on the unit direction vector, the pipe fitting identifier, and the reference direction in the preset world coordinate system, and determining the fitting orientation vector based on the processing result, includes:
[0021] The right direction vector is obtained by performing a cross product between the unit direction vector and the upper direction vector of the preset world coordinate system.
[0022] The right-direction vector and the unit direction vector are cross-producted to obtain the upward direction vector perpendicular to the slope pipe. The right-direction vector and the upward direction vector are then cross-producted, and the attachment orientation vector is determined based on the calculation result.
[0023] Optionally, generating a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point includes:
[0024] The spatial orientation vector of the sloped pipeline is determined based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point.
[0025] The pipe length is calculated based on the spatial orientation vector, and the unit direction vector is calculated based on the spatial orientation vector and the pipe length.
[0026] Optionally, the step of performing pipeline accessory positioning processing based on the unit direction vector, the distance value of the pipeline accessory, and the three-dimensional coordinates of the starting point, and determining the accessory positioning coordinates according to the processing result, includes:
[0027] Calculate the product of the unit direction vector and the distance value of the pipe fitting, and sum the calculation result with the three-dimensional coordinates of the starting point. Determine the positioning coordinates of the fitting based on the calculation result.
[0028] In a second aspect, embodiments of this application provide a three-dimensional modeling apparatus for sloped pipes, comprising:
[0029] The information acquisition module is used to acquire the three-dimensional coordinates of the starting point and ending point of the sloped pipeline, the identification of the pipe fittings, and the distance value of the pipe fittings.
[0030] A unit direction vector generation module is used to generate a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point.
[0031] The attachment positioning coordinate determination module is used to perform pipeline attachment positioning processing based on the unit direction vector, the distance value of the pipeline attachment and the three-dimensional coordinates of the starting point, and determine the attachment positioning coordinates according to the processing result.
[0032] The attachment orientation vector determination module is used to perform pipe attachment orientation processing based on the unit direction vector, the pipe fitting identifier and the reference direction in the preset world coordinate system, and determine the attachment orientation vector based on the processing result.
[0033] The 3D model generation module is used to input the 3D coordinates of the starting point, the 3D coordinates of the ending point, the orientation vector of the accessory, the positioning coordinates of the accessory, and the identifier of the pipe fitting into a preset 3D model to obtain a 3D model of the sloped pipeline.
[0034] In a third aspect, embodiments of this application provide an electronic device, the device comprising: one or more processors; and a storage device configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional modeling method for sloped pipes described in the first aspect.
[0035] In a fourth aspect, embodiments of this application provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the three-dimensional modeling method for a sloped pipe as described in the first aspect.
[0036] In this embodiment, the following steps are taken: First, the three-dimensional coordinates of the starting point and ending point of the sloped pipeline, the pipe fitting identifier, and the distance value of the pipe fitting are obtained. A unit direction vector is generated based on the starting and ending point coordinates. Then, the pipe fitting is positioned using the unit direction vector, the pipe fitting distance value, and the starting point coordinates. Next, the pipe fitting is oriented using the unit direction vector, the pipe fitting identifier, and the reference direction in a preset world coordinate system. Finally, the pipe fitting orientation vector is determined based on the processing result. The starting point coordinates, ending point coordinates, pipe fitting orientation vector, pipe fitting positioning coordinates, and pipe fitting identifier are input into a preset three-dimensional model. This approach directly determines the pipe fitting positioning coordinates and orientation vector based on the obtained starting point coordinates, ending point coordinates, pipe fitting identifier, and pipe fitting distance value. These coordinates are then input into the preset three-dimensional model of the sloped pipeline to obtain a three-dimensional model of the sloped pipeline. This eliminates the need to generate numerous auxiliary parameters or perform further rotation and alignment processing on the generated three-dimensional model, significantly improving the efficiency of generating the three-dimensional model of the sloped pipeline. Attached Figure Description
[0037] Figure 1This is a flowchart of a three-dimensional modeling method for a sloped pipe provided in an embodiment of this application;
[0038] Figure 2 This is a schematic diagram of a sloped pipe provided in an embodiment of this application;
[0039] Figure 3 This is a three-dimensional model diagram of a sloped pipe provided in an embodiment of this application;
[0040] Figure 4 This is a flowchart of an attachment orientation vector determination method provided in an embodiment of this application;
[0041] Figure 5 This is a flowchart of a method for determining a functional direction vector provided in an embodiment of this application;
[0042] Figure 6 This is a schematic diagram of the structure of a three-dimensional modeling device for a sloped pipe provided in an embodiment of this application;
[0043] Figure 7 This is a structural schematic diagram of a three-dimensional modeling device for a sloped pipeline provided in an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0045] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0046] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0047] The following description, in conjunction with the accompanying drawings, details the three-dimensional modeling method, apparatus, equipment, and medium for sloped pipelines provided in this application through specific embodiments and application scenarios.
[0048] The 3D modeling method for sloped pipes provided in this application is applied to pipe design scenarios such as gravity flow drainage systems and steam pipe condensate drainage systems. Based on these scenarios, it is understood that the execution entity for each step can be a computer device. This computer device refers to any electronic device with data computing, processing, and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers, and other terminal devices, or it can be a server or other similar equipment. This application does not limit the scope of the method.
[0049] Figure 1 This is a flowchart of a three-dimensional modeling method for a sloped pipe provided in an embodiment of this application, such as... Figure 1 As shown, it includes:
[0050] Step S101: Obtain the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the pipe fitting identifier, and the distance value of the pipe fitting for the sloped pipe. Generate a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point.
[0051] In this context, "slope pipe" refers to pipes laid at a specific angle in industrial, construction, and other engineering scenarios to meet the flow requirements of liquids or gases and prevent liquid accumulation or blockage. The starting point's three-dimensional coordinates refer to the precise location of the starting end of the slope pipe in three-dimensional space, which can be represented as (x, y, z). The ending point's three-dimensional coordinates refer to the precise location of the ending end of the slope pipe in three-dimensional space, also represented as (x, y, z). Pipe fitting identifiers refer to unique identifiers used to distinguish different types of pipe fittings (such as valves, tees, flanges, elbows, reducers, etc.), which can be composed of text or codes. Pipe fitting distance values refer to the distance parameter between the pipe fitting and the pipe's starting point along the pipe's centerline. The unit direction vector refers to a standardized vector representing the spatial orientation of the slope pipe.
[0052] In one embodiment, the system acquires the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the pipe fitting identifier, and the pipe fitting distance value selected or input by the user. The starting point's three-dimensional coordinates and the ending point's three-dimensional coordinates can be the coordinates of two points selected by the user in a 3D view, or they can be directly input coordinates. The pipe fitting distance value can also be determined by the user inputting a distance value along the centerline of a pipe branch at a specified location, or by directly picking a point on the 3D model. The pipe fitting identifier can be determined by recognizing the user's selection of a target fitting from a preset fitting storage list. After acquiring the user-provided starting point's three-dimensional coordinates, ending point's three-dimensional coordinates, pipe fitting identifier, and pipe fitting distance value, the system first calculates the spatial vector of the pipe based on the starting point's three-dimensional coordinates and the ending point's three-dimensional coordinates. Calculate the projection modulus of the vector in the horizontal plane (XY plane) and the vertical direction (Z axis) respectively: horizontal projection modulus Vertical projection module The direction coefficient k is calculated to balance the weights of the horizontal and vertical directions, ensuring that the normalized vector accurately reflects the pipe slope characteristics:
[0053] ,
[0054] When the pipe is horizontal , When the pipe is vertical , This ensures the stability of the directional coefficient under extreme operating conditions.
[0055] By combining the spatial vector, projection magnitude, and direction coefficient, a normalized calculation is performed to obtain the unit direction vector. :
[0056] , , .
[0057] The final generated unit direction vector satisfy Furthermore, it retains the synergistic characteristics of the pipeline's horizontal orientation and vertical slope.
[0058] Optionally, a unit direction vector is generated based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point, including: determining the spatial orientation vector of the sloped pipeline based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point; calculating the pipeline length based on the spatial orientation vector; and calculating the unit direction vector based on the spatial orientation vector and the pipeline length.
[0059] Among them, the spatial orientation vector can refer to the core vector used to accurately describe the spatial extension direction and displacement of the pipeline branch. The pipeline length can refer to the actual physical length of the slope pipeline branch from the starting point to the ending point along the centerline.
[0060] In one embodiment, the spatial orientation vector of the sloped pipeline is obtained by calculating the difference between the three-dimensional coordinates of the endpoint and the three-dimensional coordinates of the starting point. The pipeline length is then calculated based on this spatial orientation vector. Using the vector magnitude formula, the squares of each component of the spatial orientation vector are summed and the square root is taken to obtain the actual physical length of the pipeline. Figure 2 This is a schematic diagram of a sloped pipe provided in an embodiment of this application, such as... Figure 2 As shown, if , The formula for calculating the spatial orientation vector is:
[0061] .
[0062] The formula for calculating pipe length is:
[0063] .
[0064] The formula for calculating the unit direction vector is:
[0065] .
[0066] In this embodiment, high efficiency and accuracy are achieved in 3D modeling of sloped pipelines by precisely calculating the unit direction vector, attachment positioning coordinates, and attachment orientation vector. This reduces the need for manual intervention and avoids the rotation and alignment operations commonly encountered in traditional modeling processes, greatly improving modeling efficiency and model quality.
[0067] Step S102: Perform pipe fitting positioning processing based on unit direction vector, pipe fitting distance value and starting point three-dimensional coordinates, and determine the fitting positioning coordinates based on the processing results.
[0068] Among them, the positioning coordinates of the accessory can refer to the precise coordinates of the installation position of the pipe accessory in three-dimensional space, in order to express.
[0069] In one embodiment, the precise installation position of the pipe fitting in three-dimensional space is determined through geometric calculations based on a known unit direction vector, the distance value of the pipe fitting, and the three-dimensional coordinates of the starting point. Optionally, pipe fitting positioning processing is performed based on the unit direction vector, the distance value of the pipe fitting, and the three-dimensional coordinates of the starting point, and the fitting positioning coordinates are determined according to the processing result. This includes: calculating the product of the unit direction vector and the distance value of the pipe fitting, summing the calculation result with the three-dimensional coordinates of the starting point, and determining the fitting positioning coordinates according to the calculation result. For example, if the distance value of the pipe fitting... , , The location coordinates of the attachment are: .
[0070] Step S103: Perform pipe fitting orientation processing based on the unit direction vector, the pipe fitting identifier, and the reference direction in the preset world coordinate system, and determine the fitting orientation vector based on the processing result.
[0071] The attachment orientation vector refers to the core set of parameters used to accurately describe the attitude of the pipeline attachment in three-dimensional space, and can include a primary direction vector and auxiliary direction vectors. The primary direction vector can be in the same direction as the pipeline's unit direction vector and serves as the connection reference vector for the attachment. The auxiliary direction vector can be perpendicular to the primary direction vector and serves as the pointing reference vector for the functional components of the attachment.
[0072] In one embodiment, the orientation of the pipe fitting in three-dimensional space is determined by combining the unit direction vector, the fitting identifier, and a preset reference direction through rule matching, template calling, geometric calculation, or constraint verification. Optionally, pipe fitting orientation processing is performed based on the unit direction vector, the fitting identifier, and the reference direction in the preset world coordinate system. The fitting orientation vector is determined based on the processing result, including: performing a cross product calculation between the unit direction vector and the upward direction vector in the preset world coordinate system to obtain a right direction vector; performing a cross product calculation between the right direction vector and the unit direction vector to obtain an upward direction vector perpendicular to the sloped pipe; and performing a cross product calculation between the right direction vector and the upward direction vector. The fitting orientation vector is determined based on the calculation result.
[0073] The reference direction in the preset world coordinate system can refer to a unified spatial reference direction pre-defined in the 3D modeling system, such as the up direction vector (0,0,1), which is also the positive Z-axis direction vector. Pipe accessory orientation processing refers to the process of determining the complete attitude of the pipe accessory in 3D space through geometric operations such as cross product calculation and vector derivation, combining the unit direction vector, the accessory identifier, and the preset reference direction, including the orientation of the central axis and functional components. The right direction vector refers to the vector obtained by cross product calculation of the unit direction vector and the preset world coordinate system's "up direction vector," with its direction perpendicular to the pipe orientation and the world coordinate system's up direction. The accessory orientation vector refers to the set of vectors used to accurately quantify the 3D attitude of the pipe accessory, which may include the unit direction vector, the right direction vector, and the up direction vector perpendicular to the sloped pipe.
[0074] In one embodiment, if the valve model's default orientation is, for example, along the X-axis, the target orientation is a unit direction vector. Calculate the rotation required to change from the default orientation to the target orientation. Simultaneously, determine the orientation of the valve handwheel (i.e., the "up direction"). This can be achieved by cross-productting vector U with the "up direction" of a world coordinate system (e.g., the Z-axis (0,0,1)), resulting in a "right direction" vector. Then, multiply the "right direction" by the unit direction vector... Performing a cross product yields the final "upward direction" perpendicular to the pipe, thus completely determining the pipe's orientation. For example, the rightward direction vector is obtained by cross-product of the pipe's unit direction vector and the upward direction vector in the world coordinate system:
[0075] .
[0076] Compare the "right direction" with the unit direction vector The cross product yields the up direction vector as follows:
[0077] .
[0078] Calculate each component step by step:
[0079] Quantity: ,
[0080] Quantity: ,
[0081] Quantity: ,
[0082] After final normalization: .
[0083] Based on the above calculations, the principal direction vector, which is also the unit direction vector, is... The auxiliary direction vector is .
[0084] Step S104: Input the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the orientation vector of the attachment, the positioning coordinates of the attachment, and the identification of the pipe fitting into the preset three-dimensional model to obtain the three-dimensional model of the sloped pipe.
[0085] The preset 3D model refers to a set of standardized basic models that are pre-built and stored in the 3D modeling system for sloped pipelines and can be directly called. The 3D model drawing refers to a digital graphic generated based on the spatial parameters (such as coordinates, orientation, and dimensions) of the pipeline and its accessories, which can intuitively present the 3D spatial form and assembly relationship of the sloped pipeline and its accessories.
[0086] In one embodiment, the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the orientation vector of the attachment, the positioning coordinates of the attachment, and the pipe fitting attachment identifier are input into a preset three-dimensional model. By calling the corresponding modeling algorithm and rendering engine, a three-dimensional model diagram of the sloped pipe is generated. Figure 3 This is a three-dimensional model diagram of a sloped pipe provided in an embodiment of this application, such as... Figure 3 As shown, firstly, the overall spatial position and direction of the pipeline are determined based on the three-dimensional coordinates of the starting and ending points, and the spatial orientation of the pipeline is further refined by combining the unit direction vector. Then, the pipeline accessories are precisely placed in their corresponding positions using the accessory positioning coordinates, and their orientation is adjusted using the accessory orientation vector to ensure that their connection with the pipeline meets design requirements. Furthermore, based on the accessory identifier, the corresponding standardized accessory model from the preset three-dimensional model library is called and embedded into the overall pipeline model. Finally, after geometric calculations, texture mapping, and lighting processing, a complete pipeline model is generated, as shown below. Figure 3 The diagram shows a 3D model of a sloped pipe.
[0087] In this embodiment, the location coordinates and orientation vector of the fittings can be directly determined based on the obtained three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the fitting identifier, and the distance value of the pipe fittings. The location coordinates and orientation vector of the fittings are then input into the preset three-dimensional model of the sloped pipe to obtain the three-dimensional model of the sloped pipe. This eliminates the need to generate a large number of auxiliary parameters or perform further rotation and alignment processing on the generated three-dimensional model, greatly improving the generation efficiency of the three-dimensional model of the sloped pipe.
[0088] Figure 4 This is a flowchart of an attachment orientation vector determination method provided in an embodiment of this application, such as... Figure 4 As shown, it includes:
[0089] Step S1031: Determine the working condition type of the slope pipeline based on the unit direction vector, and combine the working condition type, pipe fitting identification and the reference direction of the preset world coordinate system to generate search keywords.
[0090] The operating condition type of the sloped pipeline can refer to the category classified according to the orientation characteristics of the pipeline's unit direction vector. Precise angles are not required; classification is based solely on the high-frequency orientation in industrial scenarios, such as horizontal, vertical, low-slope, medium-slope, and steep-slope. Search keywords can refer to strings composed of "operating condition type + pipe fitting identifier + reference direction" (e.g., "low-slope + valve + Z-axis upward"), used to quickly locate the corresponding orientation rule in the preset constraint list.
[0091] In one embodiment, the operating condition type of the sloped pipe is determined based on the characteristics of the unit direction vector. For example, if the projection modulus of the unit direction vector in the horizontal plane is much greater than the vertical projection modulus, it can be classified as a horizontal pipe; if the vertical projection modulus is dominant, it is classified as a vertical pipe; if the ratio between the two is within a specific threshold range, it is further subdivided into low-slope, medium-slope, or steep-slope types. After determining the operating condition type, a unique search keyword is generated by combining the pipe fitting identifier and the reference direction of the preset world coordinate system. This keyword is used to match the orientation rules in the preset constraint list, thereby providing a basis for subsequent fitting orientation calculations.
[0092] Step S1032: Based on the search keywords, retrieve the target orientation constraint list from the preset constraint list, and extract the auxiliary direction vector and alternative direction vector from the target orientation constraint list.
[0093] The preset constraint list refers to the offline-built list of correspondences between "working condition-attachment-baseline direction" and orientation constraints, storing standardized orientation requirements for various scenarios. The target orientation constraint list refers to the set of orientation rules for the current scenario matched from the preset constraint list based on search keywords. The auxiliary direction vector refers to the preferred orientation vector of the accessory functional components in the target orientation constraint list, used to define the preferred orientation of the accessory functional components. The alternative direction vector refers to the preset backup orientation vector in the target orientation constraint list, which is activated when the auxiliary direction vector does not meet the spatial constraints.
[0094] In one embodiment, a target orientation constraint list is obtained by precisely matching a preset constraint list based on search keywords, which is adapted to the current working condition type, fitting accessory identification, and reference direction. Auxiliary direction vectors and alternative direction vectors are extracted from the target orientation constraint list to ensure they meet the actual needs of the industrial scenario. The auxiliary direction vectors are used to prioritize the orientation of accessory functional components, while the alternative direction vectors serve as supplementary solutions, activated when the auxiliary direction vectors cannot be applied due to space constraints or design conflicts.
[0095] Step S1033: Perform a normalization check on the auxiliary direction vector based on the preset anchor point, determine the functional direction vector according to the check result, the functional direction vector is the auxiliary direction vector or the alternative direction vector, and determine the unit direction vector and the functional direction vector as the attachment orientation vector.
[0096] Among them, the preset anchor point can refer to a fixed judgment benchmark defined in a preset world coordinate system with the pipeline centerline as the reference, including safety anchor points, conflict anchor points, and standard anchor points. A safety anchor point can refer to a pre-defined "unobstructed and easily operable" spatial area. A conflict anchor point can refer to a pre-marked "collision-prone and obstructed" hazardous spatial area. A standard anchor point can refer to a compliant orientation area defined based on industry installation standards and design specifications. Standard verification can refer to the process of checking whether the auxiliary direction vector meets the requirements of "pointing to safety anchor points, avoiding conflict anchor points, and conforming to standard anchor points" using the preset anchor point as the judgment standard. The functional direction vector can refer to the final orientation vector of the accessory functional component determined after standard verification; this functional vector is one of the auxiliary direction vector or alternative direction vectors.
[0097] In one embodiment, the auxiliary direction vector undergoes multi-dimensional normative verification based on preset anchor points, including three aspects: safety, conflict, and compliance. First, it is checked whether the auxiliary direction vector points to a safe anchor point area, ensuring that the orientation of the accessory's functional components is within an unobstructed and easily operable spatial range. Second, it is determined whether the auxiliary direction vector overlaps with or is close to conflict anchor point areas, avoiding design defects caused by spatial collisions or obstructions. Finally, it is verified whether the auxiliary direction vector conforms to the requirements of the normative anchor points, ensuring compliance with industry installation standards and design specifications. If the auxiliary direction vector passes all verifications, it is determined as the functional direction vector; if it fails, an alternative direction vector is used, and the above verification process is repeated until a functional direction vector that meets the conditions is determined. Finally, the unit direction vector and the functional direction vector are combined to form a complete accessory orientation vector, used to accurately describe the posture of the pipeline accessory in three-dimensional space.
[0098] In this embodiment, the precise positioning and orientation of the sloped pipe and its accessories in three-dimensional space are ensured. This not only simplifies the tedious parameter adjustments and alignment operations in traditional modeling but also significantly improves modeling efficiency and accuracy. Through the standardized verification of preset anchor points, design deviations caused by human error or complex scenarios can be effectively avoided. The method of matching target orientation constraint lists with search keywords enhances the model's adaptability to diverse industrial scenarios, making the generated three-dimensional model more closely aligned with actual engineering needs.
[0099] Optionally, the working condition type of the sloped pipeline can be determined based on the unit direction vector, including: calculating the inclination angle of the sloped pipeline based on the unit direction vector, comparing the inclination angle with the angle threshold corresponding to each preset working condition type, and determining the working condition type based on the comparison result.
[0100] The tilt direction angle refers to an angle parameter calculated based on a unit direction vector that reflects the tilt characteristics of the sloped pipeline. The angle threshold refers to a pre-set critical angle value to distinguish different preset working condition types.
[0101] In one embodiment, the inclination angle of the sloped pipe in three-dimensional space is calculated based on the component ratios of the unit direction vector. For example, the inclination angle of the pipe is determined by the ratio of the horizontal to the vertical components of the unit direction vector, combined with the arctangent function. The calculated inclination angle is then compared one by one with the angle thresholds corresponding to preset operating conditions. If the inclination angle is less than a certain threshold, it is classified as horizontal; if it falls within a certain range, it is classified as low-slope, medium-slope, or steep-slope; if it is close to vertical, it is classified as vertical. For example, if the inclination angle is <5°, it is classified as horizontal; if it is between 5° and 30°, it is classified as low-slope; if it is between 30° and 60°, it is classified as medium-slope; and if it is less than 60°, it is classified as steep-slope.
[0102] In this embodiment, the working condition type of the sloped pipeline can be quickly and accurately determined by calculating and comparing the tilt angle, providing a reliable basis for subsequent calculation of the attachment orientation vector, and improving classification efficiency. Based on the preset angle threshold, the classification can effectively adapt to the needs of different industrial scenarios and ensure that the classification results are highly consistent with the actual engineering requirements.
[0103] Figure 5 This is a flowchart of a method for determining a functional direction vector provided in an embodiment of this application, such as... Figure 5 As shown, it includes:
[0104] Step S10331: Compare the auxiliary direction vector with the coordinate ranges of the safety anchor point, conflict anchor point, and standard anchor point respectively, and perform standardization verification on the auxiliary direction vector based on the comparison results.
[0105] Step S10332: If the auxiliary direction vector meets the normative verification conditions, the auxiliary direction vector is determined as the functional direction vector; if the auxiliary direction vector does not meet the normative verification conditions, the candidate direction vector is determined as the functional direction vector.
[0106] The coordinate range refers to a specific area defined in three-dimensional space centered on a preset anchor point, used to determine whether the direction vector meets safety, conflict, and compliance requirements. The coordinate range of a safety anchor point can be defined as an unobstructed and easily operable spatial area. The coordinate range of a conflict anchor point marks dangerous areas that may cause collisions or obstructions. The coordinate range of a specification anchor point is defined based on industry standards and design specifications, used to verify whether the auxiliary direction vector meets installation requirements.
[0107] In one embodiment, the auxiliary direction vector is compared one by one with the coordinate ranges of the safety anchor point, conflict anchor point, and standard anchor point. If the auxiliary direction vector points within the coordinate range of both the safety anchor point and the standard anchor point, and avoids the coordinate range of the conflict anchor point, then the auxiliary direction vector is considered to meet the standardization verification conditions. Otherwise, the auxiliary direction vector is considered not to meet the standardization verification conditions and cannot be used as a functional direction vector. In this case, a candidate direction vector is used as the functional direction vector. In another possible embodiment, after enabling the candidate direction vector, the same comparison process is repeated until a direction vector that meets the conditions is found.
[0108] In this embodiment, by comparing the auxiliary direction vector with the coordinate ranges of the safety anchor point, conflict anchor point, and standard anchor point respectively, the orientation of the accessory functional components can be effectively ensured to meet the requirements of safety, compliance, and conflict avoidance, thereby improving the accuracy of direction vector determination.
[0109] Figure 6 This is a schematic diagram of the structure of a three-dimensional modeling device for a sloped pipe provided in an embodiment of this application, as shown below. Figure 6 As shown, it includes:
[0110] The information acquisition module 21 is used to acquire the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point of the sloped pipeline, the identification of the pipe fittings, and the distance value of the pipe fittings.
[0111] Unit direction vector generation module 22 is used to generate a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point;
[0112] The attachment positioning coordinate determination module 23 is used to perform pipeline attachment positioning processing based on the unit direction vector, the distance value of the pipeline attachment and the three-dimensional coordinates of the starting point, and determine the attachment positioning coordinates according to the processing result.
[0113] The attachment orientation vector determination module 24 is used to perform pipe attachment orientation processing based on the unit direction vector, the pipe fitting identifier and the reference direction in the preset world coordinate system, and determine the attachment orientation vector based on the processing result.
[0114] The 3D model generation module 25 is used to input the 3D coordinates of the starting point, the 3D coordinates of the ending point, the orientation vector of the accessory, the positioning coordinates of the accessory, and the identifier of the pipe fitting into a preset 3D model to obtain a 3D model of the sloped pipe.
[0115] In this embodiment, the location coordinates and orientation vector of the fittings can be directly determined based on the obtained three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the fitting identifier, and the distance value of the pipe fittings. The location coordinates and orientation vector of the fittings are then input into the preset three-dimensional model of the sloped pipe to obtain the three-dimensional model of the sloped pipe. This eliminates the need to generate a large number of auxiliary parameters or perform further rotation and alignment processing on the generated three-dimensional model, greatly improving the generation efficiency of the three-dimensional model of the sloped pipe.
[0116] In one possible embodiment, the attachment orientation vector determination module 24 is specifically used for:
[0117] The working condition type of the sloped pipeline is determined based on the unit direction vector. The working condition type, the pipe fitting identifier, and the reference direction of the preset world coordinate system are combined to generate search keywords.
[0118] Based on the search keywords, a target orientation constraint list is retrieved from the preset constraint list, and auxiliary direction vectors and alternative direction vectors are extracted from the target orientation constraint list;
[0119] The auxiliary direction vector is normalized and verified based on the preset anchor point. The functional direction vector is determined according to the verification result. The functional direction vector is either the auxiliary direction vector or the alternative direction vector. The unit direction vector and the functional direction vector are determined as the attachment orientation vector.
[0120] In one possible embodiment, the attachment orientation vector determination module 24 is specifically used for:
[0121] The tilt angle of the sloped pipeline is calculated based on the unit direction vector. The tilt angle is compared with the angle threshold corresponding to each preset working condition type. The working condition type is determined based on the comparison result.
[0122] In one possible embodiment, the preset anchor points include safety anchor points, conflict anchor points, and canonical anchor points. Accordingly, the attachment orientation vector determination module 24 is specifically used for:
[0123] The auxiliary direction vector is compared with the coordinate ranges of the safety anchor point, the conflict anchor point, and the standard anchor point, respectively, and the standardization verification of the auxiliary direction vector is performed based on the comparison results.
[0124] If the auxiliary direction vector satisfies the normative verification conditions, the auxiliary direction vector is determined as the functional direction vector; if the auxiliary direction vector does not satisfy the normative verification conditions, the alternative direction vector is determined as the functional direction vector.
[0125] In one possible embodiment, the attachment orientation vector determination module 24 is specifically used for:
[0126] The right direction vector is obtained by performing a cross product between the unit direction vector and the upper direction vector of the preset world coordinate system.
[0127] The cross product of the right direction vector and the unit direction vector is calculated to obtain the upward direction vector perpendicular to the slope pipe. The cross product of the right direction vector and the upward direction vector is then calculated, and the attachment orientation vector is determined based on the calculation result.
[0128] In one possible embodiment, the unit direction vector generation module 22 is specifically used for:
[0129] The spatial orientation vector of the sloped pipeline is determined based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point.
[0130] The pipe length is calculated based on the spatial orientation vector, and the unit direction vector is calculated based on the spatial orientation vector and the pipe length.
[0131] In one possible embodiment, the attachment positioning coordinate determination module 23 is specifically used for:
[0132] Calculate the product of the unit direction vector and the distance value of the pipe fitting, and sum the calculation result with the three-dimensional coordinates of the starting point. Determine the positioning coordinates of the fitting based on the calculation result.
[0133] This application also provides an electronic device, which can integrate a 3D modeling system for sloped pipes provided in this application. Figure 7 This is a structural schematic diagram of a 3D modeling device for a sloped pipe provided in an embodiment of this application, with reference to... Figure 7 The 3D modeling device for the sloped pipe includes: an input device 33, an output device 34, a memory 32, and one or more processors 31; the memory 32 is used to store one or more programs; when one or more programs are executed by one or more processors 31, the one or more processors 31 implement the 3D modeling method for the sloped pipe provided in the above embodiment. The input device 33, output device 34, memory 32, and processors 31 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0134] The memory 32, as a computing device readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the 3D modeling method for sloped pipes provided in any embodiment of this application. The memory 32 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device. Furthermore, the memory 32 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 32 may further include memory remotely located relative to the processor 31, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0135] Input device 33 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 34 may include display devices such as a display screen.
[0136] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby realizing the above-mentioned three-dimensional modeling method for sloped pipes.
[0137] The three-dimensional modeling device, equipment, and computer for sloped pipes provided above can be used to execute the three-dimensional modeling method for sloped pipes provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0138] This application embodiment also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute the three-dimensional modeling method for a sloped pipeline provided in the above embodiment. The three-dimensional modeling method for a sloped pipeline includes: obtaining the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the pipe fitting identifier, and the pipe fitting distance value of the sloped pipeline; generating a unit direction vector based on the three-dimensional coordinates of the starting point and the ending point; performing pipe fitting positioning processing based on the unit direction vector, the pipe fitting distance value, and the three-dimensional coordinates of the starting point; determining the fitting positioning coordinates based on the processing result; performing pipe fitting orientation processing based on the unit direction vector, the pipe fitting identifier, and the reference direction in a preset world coordinate system; determining the fitting orientation vector based on the processing result; and inputting the three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the fitting orientation vector, the fitting positioning coordinates, and the pipe fitting identifier into a preset three-dimensional model to obtain a three-dimensional model diagram of the sloped pipeline.
[0139] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which a program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0140] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the three-dimensional modeling method of the slope pipe as described above, but can also execute related operations in the three-dimensional modeling method of the slope pipe provided in any embodiment of this application.
[0141] The 3D modeling apparatus, device, and storage medium for sloped pipes provided in the above embodiments can execute the 3D modeling method for sloped pipes provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the 3D modeling method for sloped pipes provided in any embodiment of this application.
[0142] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A three-dimensional modeling method for sloped pipes, characterized in that, include: Obtain the three-dimensional coordinates of the starting point and the ending point of the sloped pipeline, the pipe fitting identifier, and the distance value of the pipe fitting. Generate a unit direction vector based on the three-dimensional coordinates of the starting point and the ending point. The pipe fitting is located based on the unit direction vector, the distance value of the pipe fitting, and the three-dimensional coordinates of the starting point. The fitting location coordinates are then determined based on the processing results. The working condition type of the sloped pipeline is determined based on the unit direction vector. The working condition type, the pipe fitting identifier, and the reference direction of the preset world coordinate system are combined to generate search keywords. Based on the search keywords, the target orientation constraint list is retrieved from the preset constraint list. The auxiliary direction vector and the alternative direction vector in the target orientation constraint list are extracted. The auxiliary direction vector is normalized based on the preset anchor point. The functional direction vector is determined based on the verification result. The functional direction vector is the auxiliary direction vector or the alternative direction vector. The unit direction vector and the functional direction vector are determined as the fitting orientation vector. The three-dimensional coordinates of the starting point, the three-dimensional coordinates of the ending point, the orientation vector of the accessory, the positioning coordinates of the accessory, and the identifier of the pipe fitting are input into a preset three-dimensional model to obtain a three-dimensional model of the sloped pipe.
2. The three-dimensional modeling method for sloped pipes according to claim 1, characterized in that, The step of determining the operating condition type of the sloped pipeline based on the unit direction vector includes: The tilt angle of the sloped pipeline is calculated based on the unit direction vector. The tilt angle is compared with the angle threshold corresponding to each preset working condition type. The working condition type is determined based on the comparison result.
3. The three-dimensional modeling method for sloped pipes according to claim 1, characterized in that, The preset anchor points include safety anchor points, conflict anchor points, and standard anchor points; Accordingly, the step of performing a normalization check on the auxiliary direction vector based on a preset anchor point, and determining the functional direction vector based on the check result, includes: The auxiliary direction vector is compared with the coordinate ranges of the safety anchor point, the conflict anchor point, and the standard anchor point, respectively, and the standardization verification of the auxiliary direction vector is performed based on the comparison results. If the auxiliary direction vector satisfies the normative verification conditions, the auxiliary direction vector is determined as the functional direction vector; if the auxiliary direction vector does not satisfy the normative verification conditions, the alternative direction vector is determined as the functional direction vector.
4. The three-dimensional modeling method for sloped pipes according to claim 1, characterized in that, The process of orienting the pipe fittings based on the unit direction vector, the fitting identifier, and the reference direction in the preset world coordinate system, and determining the fitting orientation vector based on the processing result, includes: The right direction vector is obtained by performing a cross product between the unit direction vector and the upper direction vector of the preset world coordinate system. The right-direction vector and the unit direction vector are cross-producted to obtain the upward direction vector perpendicular to the slope pipe. The right-direction vector and the upward direction vector are then cross-producted, and the attachment orientation vector is determined based on the calculation result.
5. The three-dimensional modeling method for sloped pipes according to claim 1, characterized in that, The step of generating a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point includes: The spatial orientation vector of the sloped pipeline is determined based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point. The pipe length is calculated based on the spatial orientation vector, and the unit direction vector is calculated based on the spatial orientation vector and the pipe length.
6. The three-dimensional modeling method for sloped pipes according to claim 1, characterized in that, The process of locating the pipe fitting based on the unit direction vector, the distance value of the pipe fitting, and the three-dimensional coordinates of the starting point, and determining the fitting location coordinates based on the processing result, includes: Calculate the product of the unit direction vector and the distance value of the pipe fitting, and sum the calculation result with the three-dimensional coordinates of the starting point. Determine the positioning coordinates of the fitting based on the calculation result.
7. A three-dimensional modeling device for sloped pipes, characterized in that, include: The information acquisition module is used to acquire the three-dimensional coordinates of the starting point and ending point of the sloped pipeline, the identification of the pipe fittings, and the distance value of the pipe fittings. A unit direction vector generation module is used to generate a unit direction vector based on the three-dimensional coordinates of the starting point and the three-dimensional coordinates of the ending point. The attachment positioning coordinate determination module is used to perform pipeline attachment positioning processing based on the unit direction vector, the distance value of the pipeline attachment and the three-dimensional coordinates of the starting point, and determine the attachment positioning coordinates according to the processing result. The attachment orientation vector determination module is used to determine the working condition type of the sloped pipe based on the unit direction vector, combine the working condition type, the pipe fitting identifier, and the reference direction of the preset world coordinate system to generate search keywords, search the target orientation constraint list in the preset constraint list based on the search keywords, extract the auxiliary direction vector and the alternative direction vector from the target orientation constraint list, perform a normative verification on the auxiliary direction vector based on the preset anchor point, determine the functional direction vector based on the verification result, the functional direction vector is the auxiliary direction vector or the alternative direction vector, and determine the unit direction vector and the functional direction vector as the attachment orientation vector; The 3D model generation module is used to input the 3D coordinates of the starting point, the 3D coordinates of the ending point, the orientation vector of the accessory, the positioning coordinates of the accessory, and the identifier of the pipe fitting into a preset 3D model to obtain a 3D model of the sloped pipeline.
8. An electronic device, characterized in that, The device includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the three-dimensional modeling method for sloped pipes as described in any one of claims 1-6.
9. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the three-dimensional modeling method for a sloped pipe as described in any one of claims 1-6.