Method for batch generating cannula models based on 3DE platform
By configuring casing parameters on the 3DE platform and utilizing automation technology, casing models can be generated in batches, solving the problems of low efficiency and error-proneness in existing casing model creation technologies. This enables fast and accurate casing model generation, meeting the diverse needs of engineering design.
Patent Information
- Application Number
- CN202410639218.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-05-22
AI Technical Summary
The creation of casing models in existing 3D design software is inefficient and error-prone, making it difficult to meet the needs of large-scale engineering design.
Based on the 3DE platform, this method utilizes the modeling capabilities and automation technology of the 3DE platform, combined with secondary development interfaces, to achieve automated generation by configuring sleeve parameters, reading and parsing configuration files, selecting pipe and wall models, calculating and generating sleeve parameters, and batch generating sleeve models.
It enables rapid and accurate generation of casing models, supports customized settings, meets the needs of different engineering projects, and improves design efficiency and accuracy.
Smart Images

Figure CN118551442B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 3D modeling and BIM application technology for water conservancy and hydropower, specifically involving a method for batch generation of casing models based on the 3DE platform. Background Technology
[0002] With the continuous development and application of 3D digital design technology, more and more engineering designers are beginning to rely on 3D design software for modeling. In the fields of architecture, structure, and piping in water conservancy and hydropower engineering, casing is a key piece of equipment, and the accuracy and efficiency of its model creation are crucial to the entire engineering design.
[0003] Currently, in mainstream 3D design software such as 3DExperience (3DE), AutoCAD, Revit, and SolidWorks, the creation of sleeve models typically requires manual work. This means that designers need to create each part of the sleeve individually according to project requirements and set precise dimensions and positions. This manual creation method is not only inefficient but also prone to errors. Designers may cause model errors due to negligence or inaccurate understanding of dimensions and specifications. Furthermore, when the project is large or there are many types of sleeves, the manual model creation method is difficult to meet the requirements of project schedule and design efficiency. Summary of the Invention
[0004] The purpose of this invention is to provide a method for batch generating sleeve models based on the 3DE platform, which solves the problems of low efficiency and error-proneness in existing manual sleeve model creation methods.
[0005] The technical solution adopted in this invention is: a method for batch generating sleeve models based on a 3DE platform, comprising the following steps:
[0006] Step 1: Pre-configure the bushing parameters in the 3DE platform to obtain the configuration file;
[0007] Step 2: Read and parse the configuration file obtained in Step 1 to obtain and display the structure data of the pipeline configuration information;
[0008] Step 3: In the 3D part drawing containing the factory model, select the pipe and wall models, and select the parts and their information to be saved;
[0009] Step 4: Based on the parts and information obtained in Step 3, determine whether a sleeve can be generated. If a sleeve can be generated, proceed to Step 5; otherwise, return to Step 3.
[0010] Step 5: Calculate the generated casing parameters;
[0011] Step 6, batch generating the sleeve model based on the sleeve parameter obtained in step 5 and the pipeline configuration information obtained in step 2;
[0012] Step 7, displaying the sleeve model obtained in step 6 and adjusting the parameters according to different engineering requirements.
[0013] The application also has the characteristics that,
[0014] Step 1 specifically comprises the following steps:
[0015] Step 1.1, creating an XML file named TGParamConfig.xml;
[0016] Step 1.2, adding a root node named Config in the XML file, and setting the value of the Name node to be the pipeline and sleeve parameter correspondence table;
[0017] Step 1.3, adding a node TGInfo under the Config node, and setting the specific value of the Name node to indicate the diameter of the pipeline;
[0018] Step 1.4, adding a TGParmInfo array node under the TGInfo node, and adding multiple Param nodes in the TGParmInfo array node, and setting different Name values for each Param node to indicate different sleeve specifications;
[0019] Step 1.5, adding a TGPropertyInfo array node under the TGInfo node, and adding multiple Param nodes in the TGPropertyInfo array node, and setting different Name values for each Param node to indicate different sleeve materials;
[0020] Step 1.6, adding a TGDetailNameInfo array node under the TGInfo node, and adding multiple Param nodes in the TGDetailNameInfo array node, and setting different Name values for each Param node to indicate different sleeve names;
[0021] Step 1.7, repeating steps 1.3 to 1.6 to configure the nodes of the remaining pipeline diameters.
[0022] Step 2 specifically comprises the following steps:
[0023] Step 2.1, using the XML parsing tool NWHXMLHelper to parse the XML file obtained in step 1, reading the different pipeline diameter information of the TGInfo node by calling the GetChildNode method, and saving it to the vecTGInfoNodes array;
[0024] Step 2.2, use the GetChildNode method to read the different casing specification information of the TGParamInfo data node for each TGInfo node, and save it to the vecTGParmNodes array;
[0025] Step 2.3, use the GetChildNode method to read the different casing material information of the TGPropertyInfo data node for each TGInfo node, and save it to the vecTGPropertyInfoNodes array;
[0026] Step 2.4, use the GetChildNode method to read the different casing name information of the TGDetailNameInfo data node for each TGInfo node, and save it to the vecTGDetailNameNodes array;
[0027] Step 2.5, use the SetColumnItem method provided by the NWHListCtrl control to display the read data in the interface, and use the drop-down box to display the casing specification, casing material, and casing name columns.
[0028] Step 3 specifically includes the following steps:
[0029] Step 3.1, get the pipe model selected by the user, determine whether the selected pipe model is a part or a product through the development interface, if it is a product, recursively get all the sub-parts under the product; if it is a part, directly check the type of each part and filter out non-pipeline parts, record the matrix information, nominal diameter, vector information and part type of each part object;
[0030] Step 3.2, get the wall model selected by the user, use the development interface to determine whether the selected wall model is a part or a product, if it is a product, recursively traverse all the sub-parts of the product, and obtain the entity object in each part and identify it as a wall during the traversal process; if it is a part, directly obtain the entity object in each part and identify it as a wall;
[0031] Step 3.3, the user selects the parts to be saved from the interface.
[0032] Step 4 specifically includes the following steps:
[0033] Step 4.1, call the CreateSpecTool method to create the pipe geometry set and the wall geometry set in the selected saved parts;
[0034] Step 4.2, copy the geometry information of the pipe part obtained in step 3.1 to the pipe geometry set through the BENCopyFeature interface, and copy the geometry information of the wall part obtained in step 3.2 to the wall geometry set through the BENCopyFeature interface;
[0035] Step 4.3, traverse all objects in the pipe geometry set and the wall geometry set, use the CreateIntersect interface to detect whether each pipe model intersects with the wall model, if intersected, go to the next step, otherwise return to step 3;
[0036] Step 4.4, use the ConvertToDatum interface to split the intersected object into four new objects, the first and second features represent the inner and outer diameter circles of the intersection of one side of the wall and the pipe, and use Circle1 to represent the outer diameter circle object, the third and fourth features represent the inner and outer diameter circles of the intersection of the other side of the wall and the pipe, and use Circle2 to represent the outer diameter circle object of the other side, the split objects represent the intersection part of the pipe and the wall, and according to the shape of the intersection part, it is judged whether the casing can be generated.
[0037] Step 5 is specifically:
[0038] When detecting that the pipe intersects with the wall to form a circular feature, first determine the intersection objects on both sides of the wall, then use the GetCenter interface to obtain the center point coordinates CenterPoint1 and CenterPoint2 of Circle1 and Circle2, and according to the Z-axis components of the two coordinate values, it is judged whether the wall is horizontally or vertically penetrated by the pipe, if it is judged that the wall is vertically penetrated by the pipe, then add a margin to the Z value of the coordinate point with the largest Z value;
[0039] When detecting that the pipe intersects with the wall to form an elliptical feature, first determine the intersection objects on both sides of the wall, then use the CreatePoint interface to create the center point of the elliptical intersection part, and use the GetPoint interface to obtain the center point coordinates CenterPoint1 and CenterPoint2.
[0040] Step 6 specifically includes the following steps:
[0041] Step 6.1, generate the guide line of the casing using the center point coordinates CenterPoint1 and CenterPoint2, and then use the CreateLine method to create a guide line by inputting the center point coordinates CenterPoint1 and CenterPoint2 as parameters;
[0042] Step 6.2, a reference plane is created based on the incoming circle or ellipse object using the CreatePlane method as a reference when creating the inner and outer circle objects of the sleeve, and the created reference planes are named as Plane1 and Plane2 respectively;
[0043] Step 6.3, according to the diameter of the pipe, the GetColumnItem method is used to obtain the sleeve parameters corresponding to the pipe diameter in the NWHListCtrl control of step 2.5;
[0044] Step 6.4, based on the center point coordinate value, the reference plane and the inner and outer radii of the sleeve parameters obtained in step 6.3, the CreateCircle method is used to generate the scanning contour of the sleeve, and the contour represents the shape of the sleeve;
[0045] Step 6.5, based on the guide line created in step 6.1 and the sleeve contour generated in step 6.4, the CreateExplicitSweep method is used to batch generate the sleeve model.
[0046] The sleeve model batch generated in step 6.5 is displayed in step 7 using the NWHListCtrl control.
[0047] The beneficial effects of the present application are: the method for batch generating sleeve models based on the 3DE platform of the present application utilizes the modeling function, automation technology and rich secondary development interface of the 3DE platform, and develops an interface that can quickly and accurately generate various types of sleeve models. By selecting the pipe, wall, generated and saved model and configured sleeve parameters by the designer, the sleeve model is batch generated, and customized settings can also be made according to actual needs to meet the needs of different engineering projects. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a flowchart of the method for batch generating sleeve models based on the 3DE platform of the present application;
[0049] Figure 2 is a sleeve parameter XML configuration diagram in the method for batch generating sleeve models based on the 3DE platform of the present application;
[0050] Figure 3 is a batch generating sleeve program interface diagram in the method for batch generating sleeve models based on the 3DE platform of the present application;
[0051] Figure 4 is a through-wall sleeve model diagram in the method for batch generating sleeve models based on the 3DE platform of the present application. DETAILED DESCRIPTION
[0052] The application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] Embodiment 1
[0054] The application provides a method for efficiently and accurately generating sleeve models in batches based on a 3DE platform. The modeling function, automation technology and rich secondary development interface of the 3DE platform are used to develop a function for quickly and accurately generating various types of sleeve models through an interface. The designer selects a pipeline, a wall body, a generated and saved model and configured sleeve parameters to generate sleeve models in batches, and the sleeve models can also be customized according to actual requirements to meet the requirements of different engineering projects. The method has the advantages of simple operation, flexible application, one-key generation and comprehensive function.
[0055] Embodiment 2
[0056] The application provides a method for generating sleeve models in batches based on a 3DE platform, as shown in Figure 1 The following steps are implemented:
[0057] S1: In order to improve design efficiency and accuracy, sleeve parameters need to be pre-configured in the design software. As shown in Figure 2 The TGParamConfig.xml file is used to pre-set the sleeve diameter and thickness matched with the pipeline of different diameters, and set the name and material of each sleeve. For example, for the pipeline with a diameter of DN50, the sleeve diameter is Φ89, the thickness is 4.5 mm, the name is "welded steel pipe", and the material is 20#. In this way, during the design process, the system can automatically select the appropriate sleeve, avoiding the tedious operation of manual calculation and selection by the designer.
[0058] S2: The configured file is read and parsed: the TGParamConfig.xml file configured in S1 is read into the computer memory, and is parsed according to the XML format to obtain the structure data of the pipeline configuration information, and the data structure is displayed using the CListCtrl list control provided by MFC. For the three columns of sleeve specifications, sleeve names and sleeve materials, the user can manually select or modify them to meet the use requirements of the current project.
[0059] S3: In the 3D part graphics containing the plant model, the user can operate through the interactive interface. The user can select the pipe parts, products and wall parts, and select the parts to be saved. By using the development interface provided by 3DE, the program can determine whether the current selection is a part or a product. If the selection is a product, the program will perform recursive search to obtain all related part objects under the product. In this process, the program will record the matrix information, nominal diameter, vector information and part type of each part object. These information is very important for subsequent analysis and operation.
[0060] S4: In the selection of parts to be saved, two new geometric graphics sets, "pipe" and "wall", are added. For pipe parts, first filter the needed pipe parts through the part type. Then, copy these pipe parts to the "pipe" geometric graphics set. Similarly, copy the geometric body objects in the wall parts obtained in S3 to the "wall" geometric graphics set. Next, traverse the features in the "pipe" and "wall" geometric graphics sets. For each feature, call the intersection command of 3DE to determine whether the two objects intersect. If the two objects intersect, and the features of the two objects can be obtained and the features are circles or ellipses, then it can be confirmed that a sleeve can be generated. Otherwise, a sleeve cannot be generated.
[0061] S5: Through the intersection line generated in S4, the two object features are split into two groups of features. Then, use the measurement interface to determine whether the current object is a circle or an ellipse. If it is a circle, it indicates that it is horizontally or vertically penetrated, and if it is an ellipse, it indicates that it is diagonally penetrated. For each group of features, find the one with the largest outer diameter, and name them Circle1 and Circle2 respectively. Next, calculate the center point coordinates of Circle1 and Circle2, represented by CenterPoint1 and CenterPoint2 respectively, which will be used for subsequent drawing of the sleeve center line and determining whether the current pipe penetrates the wall or the board. If the pipe penetrates the board, the sleeve will be added by 50mm upwards for safety. Therefore, the Z value of CenterPoint1 or CenterPoint2 with the larger value needs to be added by this offset.
[0062] S6: As shown in Figure 3 , in S5, the center points of Circle1 and Circle2 are used as the basis to create the guide line of the sleeve. Through this center point, further create reference surfaces related to Circle1 and Circle2. Then, use these reference surfaces and the center to create a three-dimensional circular feature. This three-dimensional circle represents a part of the sleeve. Finally, use the scanning function to combine this three-dimensional circle with the previously created guide line, thereby generating the final sleeve.
[0063] S7: AsFigure 4 As shown, in S6, the sleeves are batch generated and listed in a list for the user to view. The user can click on a certain sleeve to view whether its size and position meet the requirements. If it is found that the size of a certain sleeve is not suitable, the user can manually modify it to meet the actual needs of the project. This flexibility allows designers to quickly adjust sleeve parameters to ensure that they can meet various engineering requirements.
[0064] Embodiment 3
[0065] The present application provides a method for batch generating sleeve models based on a 3DE platform, and the following scheme is preferred based on Embodiment 2:
[0066] The step of configuring sleeve parameters in the TGParamConfig.xml file in S1 further includes the following steps:
[0067] S11: Create a new XML file and name it “TGParamConfig.xml”.
[0068] S12: Add a root node to the XML file and name it “Config”, and set the value of its “Name” node to “Pipe and Sleeve Parameter Correspondence Table”.
[0069] S13: Add a new node “TGInfo” under the “Config” node, and set a specific value to its “Name” node, such as “DN15”, indicating the diameter of the pipe.
[0070] S14: Add a “TGParmInfo” array node under the “TGInfo” node. In this array node, add multiple “Param” nodes and set different “Name” values to each “Param” node, such as “Φ48x4”, “Φ60x4”, “Φ76x4”, and “Others”, which correspond to different sleeve diameter specifications.
[0071] S15: Add a “TGPropertyInfo” array node under the “TGInfo” node. In this array node, add multiple “Param” nodes and set different “Name” values to each “Param” node, such as “20#”, “304”, and “Others”, indicating different material types.
[0072] S16: Add a “TGDetailNameInfo” array node under the “TGInfo” node. In this array node, add multiple “Param” nodes and set different “Name” values to each “Param” node, such as “Welded Steel Pipe” and “Seamless Steel Pipe”.
[0073] S17: Repeat the steps of S13 to S16 to configure for other pipe diameters. For example, "DN20", "DN25", and so on.
[0074] The configuration file in step S2 is read and parsed, and further includes the following steps:
[0075] S21: Use the XML parsing tool NWHXMLHelper to parse the "TGParamConfig.xml" file. By calling the GetChildNode method, the information of the "TGInfo" node is read and saved to the "vecTGInfoNodes" array. These information includes different pipe diameters, such as "DN15", "DN20", "DN25", and so on.
[0076] S22: Use the GetChildNode method for each "TGInfo" node, this time to read the information of the "TGParmInfo" data node. These information is saved to the "vecTGParmNodes" array, such as "Φ48x4", "Φ60x4", "Φ76x4", "Others", representing different pipe diameter specifications.
[0077] S23: Use the GetChildNode method for each "TGInfo" node, this time to read the information of the "TGPropertyInfo" data node. These information is saved to the "vecTGPropertyInfoNodes" array, such as "20#", "304", "Others", representing different material types.
[0078] S24: Use the GetChildNode method for each "TGInfo" node, this time to read the information of the "TGDetailNameInfo" data node. These information is saved to the "vecTGDetailNameNodes" array, such as "Welded Steel Pipe", "Seamless Steel Pipe", representing different pipe names.
[0079] S25: Use the SetColumnItem method provided by the NWHListCtrl control to display the data obtained in the previous steps in the interface. For the three columns of casing specifications, casing names, and casing materials, use drop-down boxes to display, so that users can manually modify them.
[0080] In step S3, the pipe, wall, and selected part information to be saved are obtained; further including the following steps:
[0081] S31: First, obtain the selected pipe model. Then, determine whether the model is a part or a product through an interface. If the model is a product, recursively obtain all sub-parts under that product. During this process, check whether the type of each part is "PipRigidMainSuperSweep" to determine if it is a pipe part. If it is not a pipe part, filter it out and do not consider it. During this process, the program records the matrix information, nominal diameter, vector information, and part type of each part object. This information is very important for subsequent analysis and operations.
[0082] S32: Next, obtain the wall model selected by the user. Then, use an interface to determine whether the model is a part or a product. If the model is a product, all its sub-parts will be recursively traversed. During this traversal, entity objects within each part will be retrieved, and these entity objects will be assumed to be walls by default. Other types of model objects will be ignored and not included in subsequent processing.
[0083] S33: The user selects the part to be saved from the interface. This part will be used for subsequent sleeve interference processing and saving the results of the model generation.
[0084] Step S4, the process of determining and generating the sleeve, also includes the following steps:
[0085] S41: First, in the selected saved parts, call the CreateSpecTool method to create two important sets of "pipes" and "walls" geometry.
[0086] S42: In stages S31 and S32, the previously identified and selected pipe and wall components were traversed. The geometric information of these components was copied to the corresponding geometry set via the BENCopyFeature interface. This is done to manage pipe and wall data separately, facilitating subsequent processing and analysis. Simultaneously, it ensures that the names of the pipe and wall models remain consistent with their original names during the copying process, guaranteeing data consistency and accuracy.
[0087] S43: In step S42, the objects in the geometry sets begin to be processed. By traversing all objects in both the "Pipes" and "Walls" geometry sets, the CreateIntersect interface is used to detect whether each pipe model intersects with a wall model. This step is crucial because only intersecting pipes are included in subsequent processing.
[0088] S44: Further splitting processing is performed on the intersected objects detected in step S43. By using the ConvertToDatum interface, the intersected objects are split into four new objects, the first and second features represent the inner and outer diameter circles of the wall intersected by the pipe, and Circle1 is used to represent the outer diameter circle object, the third and fourth features represent the inner and outer diameter circles of the other side of the wall intersected by the pipe, and Circle2 is used to represent the outer diameter circle object of the other side, which represent the intersected parts of the pipe and the wall. Next, the shape features of these intersected parts are analyzed in detail. According to the shape of the intersected part, it can be judged whether a sleeve can be generated. For example, if the intersected part presents a circular or elliptical feature, it can be considered that a sleeve can be generated.
[0089] Step S5: Calculate the parameters of the sleeve; further comprising the following steps:
[0090] S51: When the pipe intersects the wall to form a circular feature, first determine the intersected objects on both sides of the wall. Then, use the GetCenter interface to obtain the center point coordinate values of Circle1 and Circle2, which are represented by CenterPoint1 and CenterPoint2 in the following. By analyzing the Z-axis components of these two coordinate values, it can be judged whether the wall is horizontally or vertically penetrated by the pipe.
[0091] S52: If it is judged that the wall is vertically penetrated by the pipe, in order to ensure safety, additional space will be considered in the design of the sleeve. Specifically, 50mm will be added to the Z value of the coordinate point with the maximum Z value in CenterPoint1 or CenterPoint2, to ensure that the sleeve can cover the entire area of the pipe and wall intersection in the vertical direction and provide additional safety margin.
[0092] S53: For the case of elliptical intersection, the intersected objects on both sides of the wall also need to be determined. Then, the center point of the elliptical intersection part is created by the CreatePoint interface, and the coordinate value of this center point is obtained by the GetPoint interface, which is represented by CenterPoint1 and CenterPoint2 in the following.
[0093] Step S6: Batch generation of sleeves; further comprising the following steps:
[0094] S61: In steps S51 or S53, the coordinates of the two center points CenterPoint1 and CenterPoint2 can be used to generate the guide line of the sleeve. Then, a CreateLine method is used to create a guide line by passing in the two center point coordinates as parameters.
[0095] S62: Use the CreatePlane method to create a plane based on the incoming circle or ellipse object (e.g. Circle1 or Circle2). This plane will serve as a reference when creating the inner and outer circle objects of the sleeve. The created planes can be named Plane1 and Plane2 respectively to distinguish between different planes.
[0096] S63: Depending on the diameter of the pipe, the GetColumnItem method will be used in the NWHListCtrl control mentioned in step S25 to retrieve the sleeve parameters corresponding to the pipe diameter. These data will be used to create the scan profile of the sleeve in the subsequent steps.
[0097] S64: With the inner and outer radii of the sleeve, as well as the coordinates of the center point and the reference plane (as obtained in step S63), the CreateCircle method can be used to generate the scan profile of the sleeve. This method will create a circular profile based on the provided center point coordinates (e.g. CenterPoint1), the reference plane (e.g. Plane1), and the inner and outer radii of the sleeve obtained from step S63. This profile will represent the shape of the sleeve and be used to generate the sleeve model later.
[0098] S65: Use the CreateExplicitSweep method to generate a sleeve model based on the guide line generated in step S61 and the sleeve profile generated in step S64, and name it "Sleeve Model 1…N".
[0099] Step S7: Viewing and modifying the sleeve model; also includes the following steps:
[0100] S71: Use the NWHListCtrl control to display the sleeve models generated in step S65. This control will display the name, model information and other related data of each sleeve. Through the list, users can clearly see all the generated sleeve models and easily view and manage them.
[0101] S72: When the user selects a row in the list by mouse, the system automatically displays the sleeve model corresponding to the row in the center and highlights it, so that the user can more clearly view the details of the model.
[0102] S73: In addition, when the user selects the model column, the system provides a drop-down menu for the user to select other models of the configuration. At the same time, a custom interface is provided to allow the user to input other model information. Once the user selects a new model or inputs custom model information, the system will automatically update the displayed model to reflect the changes made.
Claims
1. A method for batch generating cannula models based on a 3DE platform, characterized in that, The method comprises the steps of: Step 1, pre-configuring sleeve parameters in a 3DE platform to obtain a configuration file; specifically comprising the following steps: Step 1.1, creating an XML file named TGParamConfig.xml; Step 1.2, adding a root node named Config in the XML file, and setting a value for the Name node, which is a pipe and sleeve parameter corresponding table; Step 1.3, adding a TGInfo node under the Config node, and setting a specific value for the Name node, which indicates the diameter of the pipe; Step 1.4, adding a TGParmInfo array node under the TGInfo node, and adding multiple Param nodes in the TGParmInfo array node, and setting different Name values for each Param node, which indicates different sleeve specifications; Step 1.5, adding a TGPropertyInfo array node under the TGInfo node, and adding multiple Param nodes in the TGPropertyInfo array node, and setting different Name values for each Param node, which indicates different sleeve materials; Step 1.6, adding a TGDetailNameInfo array node under the TGInfo node, and adding multiple Param nodes in the TGDetailNameInfo array node, and setting different Name values for each Param node, which indicates different sleeve names; Step 1.7, repeating steps 1.3 to 1.6 to configure the nodes of the remaining pipe diameters; Step 2, reading and parsing the configuration file obtained in step 1 to obtain structural data of the pipe configuration information and display the structural data; Step 3, selecting pipe and wall models in a 3D part graphic containing a plant model, and selecting parts and information to be saved; Step 4, determining whether a sleeve can be generated based on the parts and information obtained in step 3, and if so, proceeding to step 5, otherwise returning to step 3; Step 5, calculating the generated sleeve parameters; Step 6, generating sleeve models in batches based on the sleeve parameters obtained in step 5 and the pipe configuration information obtained in step 2; Step 7, displaying the sleeve models obtained in step 6 and adjusting parameters according to different engineering requirements.
2. The method for batch generating cannula models based on a 3DE platform of claim 1, wherein, The step 2 specifically comprises the following steps: Step 2.1, using an XML parsing tool NWHXMLHelper to parse the XML file obtained in step 1, reading different pipe diameter information of the TGInfo node by calling the GetChildNode method, and saving the information to the vecTGInfoNodes array; Step 2.2, using the GetChildNode method to read different sleeve specification information of the TGParmInfo data node for each TGInfo node, and saving the information to the vecTGParmNodes array; Step 2.3, read the different casing material information of the TGPropertyInfo data node for each TGInfo node using the GetChildNode method and save it to the vecTGPropertyInfoNodes array; Step 2.4, read the different casing name information of the TGDetailNameInfo data node for each TGInfo node using the GetChildNode method and save it to the vecTGDetailNameNodes array; Step 2.5, display the read data in the interface using the SetColumnItem method provided by the NWHListCtrl control, and use a drop-down box to display the casing specification, casing material, and casing name columns.
3. The method for batch generating cannula models based on a 3DE platform of claim 2, wherein, The step 3 specifically comprises the following steps: Step 3.1, obtain the pipe model selected by the user, determine whether the selected pipe model is a part or a product through the development interface, if it is a product, recursively obtain all sub-parts under the product; if it is a part, directly check the type of each part and filter out non-pipeline parts, and record the matrix information, nominal diameter, vector information and part type of each part object; Step 3.2, obtain the wall model selected by the user, determine whether the selected wall model is a part or a product through the development interface, if it is a product, recursively traverse all sub-parts of the product, and obtain the entity object in each part and identify it as a wall during the traversal process; if it is a part, directly obtain the entity object in each part and identify it as a wall; Step 3.3, the user selects the parts to be saved from the interface.
4. The method for batch generating cannula models based on a 3DE platform of claim 3, wherein, The step 4 specifically comprises the following steps: Step 4.1, call the CreateSpecTool method in the selected saved parts to create a pipe geometry set and a wall geometry set; Step 4.2, copy the geometry information of the pipe parts obtained in step 3.1 to the pipe geometry set through the BENCopyFeature interface, and copy the geometry information of the wall parts obtained in step 3.2 to the wall geometry set through the BENCopyFeature interface; Step 4.3, traverse all objects in the pipe geometry set and the wall geometry set, use the CreateIntersect interface to detect whether each pipe model intersects with the wall model, if it intersects, go to the next step; otherwise, return to step 3; Step 4.4, use the ConvertToDatum interface to split the intersecting objects into four new objects, the first and second features represent the inner and outer diameter circles of the intersection of the wall on one side with the pipe, and use Circle1 to represent the outer diameter circle object, the third and fourth features represent the inner and outer diameter circles of the intersection of the wall on the other side with the pipe, and use Circle2 to represent the outer diameter circle object on the other side, the split objects represent the intersection part of the pipe and the wall, and according to the shape of the intersection part, it is determined whether a casing can be generated.
5. The method for batch generating cannula models based on a 3DE platform of claim 4, wherein, The step 5 is specifically: When the pipe intersects with the wall to form a circular feature, first determine the intersecting objects on both sides of the wall, then use the GetCenter interface to obtain the center point coordinates of Circle1 and Circle2, CenterPoint1 and CenterPoint2, and according to the Z-axis components of the two coordinate values, determine whether the wall is horizontally or vertically penetrated by the pipe. If it is determined that the wall is vertically penetrated by the pipe, add a margin to the Z value of the coordinate point with the largest Z value; When the pipe intersects with the wall to form an elliptical feature, first determine the intersecting objects on both sides of the wall, then use the CreatePoint interface to create the center point of the elliptical intersection part, and use the GetPoint interface to obtain the center point coordinates CenterPoint1 and CenterPoint2.
6. The method for batch generating cannula models based on a 3DE platform of claim 5, wherein, The step 6 specifically includes the following steps: Step 6.1, using the center point coordinates CenterPoint1 and CenterPoint2 to generate the guide line of the sleeve, and then using the CreateLine method to create a guide line by inputting the center point coordinates CenterPoint1 and CenterPoint2 as parameters; Step 6.2, using the CreatePlane method to create a reference plane based on the input circle or ellipse object, as a reference for creating the inner and outer circle objects of the sleeve, and naming the created reference planes as Plane1 and Plane2 respectively; Step 6.3, according to the diameter of the pipe, using the GetColumnItem method to obtain the sleeve parameters corresponding to the diameter of the pipe in the NWHListCtrl control of step 2.5; Step 6.4, based on the center point coordinates, the reference plane and the inner and outer radii obtained in step 6.3, using the CreateCircle method to generate the sweep contour of the sleeve, which represents the shape of the sleeve; Step 6.5, based on the guide line created in step 6.1 and the sleeve contour generated in step 6.4, using the CreateExplicitSweep method to batch generate the sleeve model.
7. The method of claim 6, wherein, In the step 7, the NWHListCtrl control is used to display the sleeve model batch generated in step 6.5.
Citation Information
Patent Citations
3DE template establishment method and system based on Python language
CN117057000A
Weft-ground data analysis and model generation method based on 3DE platform
CN117237550A