MicroStation-based three-dimensional model feature recognition and application method
Through the custom attribute files and model feature recognition methods in MicroStation software, the problems of insufficient utilization and logical association of model data in 3D modeling are solved, automated modeling and assembly are realized, and modeling efficiency and data utilization are improved.
Patent Information
- Application Number
- CN202510699917.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-10-10
AI Technical Summary
Existing 3D modeling software has problems in engineering design such as low modeling efficiency, insufficient utilization of model data, and lack of logical connections between models, making it difficult to achieve automated modeling and assembly.
Through the 3D model feature recognition method based on MicroStation, the logical association between models is established using custom attribute files, the model information and position information are obtained, and the automatic construction and assembly of the model is realized.
It realizes intelligent auxiliary modeling between models, improves modeling efficiency, realizes adaptive recognition and linkage effects of models, and enhances the utilization and logical association of model data.
Smart Images

Figure CN120765833A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional modeling, and in particular to a method for three-dimensional model feature recognition and application based on MicroStation. BACKGROUND
[0002] With the development of computer technology and the upgrading of design tool software, the design software developers and engineering construction personnel have proposed the concept of evolving from computer-aided design to three-dimensional collaborative design, which is mainly widely used in the field of architectural engineering. Early three-dimensional collaborative design is limited to generating a building information model (BIM) in a computer, which is a supplement to traditional two-dimensional design, providing a three-dimensional visual model for design verification. The results of the design include two-dimensional drawings and three-dimensional visual models.
[0003] In the past, many engineering construction fields in China have encountered the so-called "last mile" problem when applying imported three-dimensional design software. The common feature of existing software is to create a BIM model. The method of creating a model is to manually assemble a three-dimensional model according to the construction elements, and the elements used to build the model are generally general elements. Therefore, the modeling method usually has no professional characteristics, the three-dimensional modeling efficiency is not high, and the model and data are not fully utilized. The significance of the BIM era lies in replacing a part of the design itself with intelligence. Unfortunately, the engineering design industry at home and abroad focuses on researching how to use BIM technology to create engineering models. The modeling method is still mostly based on two-dimensional drawings to flip models. The "flipped model" is limited by the defects of the modeling tool architecture and function, and there is no logical association between models, which can only be regarded as a pile of discrete entities. BIM technology solves the simplest three-dimensional expression problem, but does not solve the problem of automatic data collection, storage, calculation, and reprocessing, and ultimately automatic modeling and assembly. The engineering information contained in the three-dimensional model is static and discrete attributes. There is no correlation between the geometric information of the model and the engineering attributes. A large amount of data and engineering information is hidden in the three-dimensional model and cannot be utilized or cannot be utilized. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the related art to some extent.
[0005] To this end, the present application aims to provide a method for three-dimensional model feature recognition and application based on MicroStation, so as to solve the problem of automatic modeling and assembly.
[0006] To achieve the above-mentioned purpose, the present application embodiment provides a method for three-dimensional model feature recognition and application based on MicroStation, which comprises:
[0007] The method for three-dimensional model feature recognition and application based on MicroStation is characterized by comprising the following steps:
[0008] When drawing a second model that has a structural association relationship with a first model in the current three-dimensional space, clicking the first model with a mouse to obtain model information and position information of the first model;
[0009] Based on the object type of the first model and the object type of the second model, acquiring attribute information of the second model from a custom attribute file, wherein the attribute information of the second model includes the attribute information of the first model; the custom attribute file is used to define attribute information of each type of model element, each type of model element corresponds to an object type, and the attribute information of each type of model element includes attribute information of associated model elements that have an associated relationship with the model element;
[0010] Based on the attribute information of the second model, the model information and the position information of the first model, the construction of the second model and the assembly of the second model and the first model are automatically achieved.
[0011] In some implementations, the models in the current three-dimensional space are constructed by combining data files with generated models, the data files include a first data file and a second data file, the first data file is used to define the parameters and attribute information of the model elements, and the second data file is used to define the geometric shape and operation effects of the model elements; the first data file includes a first function and a second function, the first function and the second function are used to obtain the attribute information of the associated model elements that have an association relationship with their own model elements from the custom attribute file.
[0012] In some implementations, the acquiring model information and position information of the first model by clicking the first model with a mouse includes:
[0013] Obtain a mouse click event, and determine whether a model exists at the mouse capture point through the mouse click event;
[0014] If a model exists at the mouse capture point, the model-related information obtained by the mouse click event is stored in an information instance of the model information class;
[0015] Converting the values of the information instances into corresponding object types one by one according to a matching table; the matching table includes correspondences between model elements corresponding to multiple object types and model-related information obtained by mouse clicks;
[0016] Use if and else judgment statements to determine whether the object type obtained after the conversion is empty. If the object type obtained after the conversion is not empty, it is determined that a model exists at the mouse capture point, and the type of the model is the target object type obtained after the current conversion; based on the target object type, the model information and position information of the first model are obtained.
[0017] In some implementations, the method further includes:
[0018] In response to a move operation or a zoom operation of the second model clicked by a mouse, the position information of the first model is adjusted according to the position information of the second model through the first control function in the second data file; wherein, the first control function is used to control the transformation method of the model during movement and zooming when drawing the model, and to adjust the position information between logically associated models.
[0019] In some implementations, adjusting the position information of the first model according to the position information of the second model includes:
[0020] Storing the position information of the second model into the first position variable; and obtaining the modeling base point of the second model from the first position variable;
[0021] According to the construction method of the second model, obtaining a positional relationship between the second model and the first model when they are installed;
[0022] Acquire a placement base point of the first model according to the positional relationship and the modeling base point of the second model;
[0023] Replacing the modeling base point of the second model with the placement base point of the first model, and updating the position information stored in the first position variable;
[0024] The value of the first position variable is assigned to the first model to achieve a linkage effect between the second model and the first model.
[0025] In some implementations, automatically constructing the second model and assembling the second model with the first model based on the attribute information of the second model, the model information and the position information of the first model includes:
[0026] Based on the attribute information of the second model, the model information and position information of the first model, the second model is subjected to a three-dimensional solid cutting operation through the first model, thereby automatically realizing the construction of the second model and the cutting effect between the first model and the second model.
[0027] In some implementations, the method further includes:
[0028] In response to drawing a third model and the third model being a pipeline model, obtaining model information of all built pipeline models in the current design environment;
[0029] Based on the model information and position information of all the built pipeline models and the model information and position information of the third model, determining whether a center line of each of all the built pipeline models intersects with a center line of the third model;
[0030] When a second pipeline model in all built pipeline models has an intersection with the center line of the third model, obtaining an angle between the center line of the second pipeline model and the center line of the third model;
[0031] A fourth model connecting the third model and the second pipeline model is adaptively generated according to the angle between the center line of the second pipeline model and the center line of the third model and the position of the intersection.
[0032] In some implementations, determining whether a center line of each of all the built pipeline models intersects a center line of the third model based on the model information and location information of all the built pipeline models and the model information and location information of the third model includes:
[0033] Acquire a spatial occupancy range of the third model according to the position information and model information of the third model;
[0034] Acquire the spatial occupancy range of the built pipeline model according to the location information and model information of the built pipeline model;
[0035] Determine whether there is an overlapping area between the spatial occupation range of the third model and the spatial occupation range of the built pipeline model;
[0036] Based on the judgment result of whether there is an overlapping area between the spatial occupation range of the third model and the spatial occupation range of the built pipeline model, it is determined whether the center line of each built pipeline model in all the built pipeline models has an intersection with the center line of the third model.
[0037] In some implementations, the fourth model is one of an elbow model, a tee model, a cross model, and a reducer model.
[0038] In some implementations, the custom attribute file is an XML format file.
[0039] The application provides a three-dimensional model feature recognition and application method based on MicroStation, which realizes intelligent auxiliary modeling effects such as model recognition, adaptive modeling and model linkage between models by defining model attributes and establishing logical association between models through model attributes.
[0040] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following description and drawings or can be learned by practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0041] The above and / or additional aspects and advantages of the application will become apparent and be readily understood by considering the following detailed description, including the accompanying drawings, in which:
[0042] Figure 1 A flowchart of a three-dimensional model feature recognition and application method based on MicroStation provided by an embodiment of the application;
[0043] Figure 2 An example diagram of an implementation method for converting object types by matching tables provided by an embodiment of the application;
[0044] Figure 3 An example diagram of a method for obtaining model types by if, else judgment statements provided by an embodiment of the application;
[0045] Figure 4 An example diagram of a self-defined attribute file provided by an embodiment of the application;
[0046] Fig. 5(a) and (b) are example diagrams of a model space provided by an embodiment of the application;
[0047] Figure 6 An example diagram of a global element search method provided by an embodiment of the application. DETAILED DESCRIPTION
[0048] The embodiments of the application are described in detail below with reference to the accompanying drawings, wherein the same or similar notations used throughout the drawings and the specification denote the same or similar elements or elements having the same or similar functions. The embodiments described below by reference to the drawings are exemplary and are intended to explain the application, and cannot be understood as limiting the application.
[0049] A three-dimensional model feature recognition and application method based on MicroStation provided by an embodiment of the application is described below with reference to the accompanying drawings.
[0050] Figure 1A flowchart of a method for three-dimensional model feature recognition and application based on MicroStation provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the method for three-dimensional model feature recognition and application based on MicroStation includes the following steps: Figure 1
[0051] In step S101, when a second model having a structural association relationship with a first model is drawn in a current three-dimensional space, the model information and position information of the first model are acquired by clicking the first model with a mouse.
[0052] As an implementation manner, the method is implemented by using C++ language, and a digital software development framework is used as a development basis. When each type of parameterized model element is defined, a class of each type of model element is established, and the class includes unique element ID information of the model element, such as a steel pipe class ID 6101, a steel elbow class ID 6201, a steel tee class ID 6301, and a steel reducing pipe ID 6501. Meanwhile, for each type of object, a plurality of engineering properties and geometric parameters corresponding to the object are defined, which are collectively referred to as model information. For example, the model information includes pipe diameter and wall thickness, tee branch pipe end length, elbow angle and radius, and the like. These information are self-attribute information of each model, and a system function needs to be used to read the related attributes, and the information is only used for manual reading and recognition.
[0053] In some embodiments, the method for acquiring the model information and position information of the first model by clicking the first model with the mouse includes the following steps. A mouse click event is acquired. It is determined whether a mouse capture point exists in a model by using the mouse click event. If the mouse capture point exists in the model, model-related information acquired by the mouse click event is stored in an information instance of a model information class. The value of the information instance is converted into a corresponding object type according to a matching table. The matching table includes a corresponding relationship between model elements corresponding to a plurality of object types and the model-related information acquired by the mouse click. If and else judgment statements are used to determine whether the object type obtained after the conversion is empty. If the object type obtained after the conversion is not empty, it is determined that the mouse capture point exists in the model, and the type of the model is the target object type obtained after the current conversion. Based on the target object type, the model information and position information of the first model are acquired.
[0054] By using if and else statements, you can control the content and number of the judgment conditions to determine which element types can achieve adaptive recognition during 3D modeling. For example, if (capture as pipe) else (capture as tee) will only recognize pipes and tees. By increasing the number of else statements, objects such as supports, hangers, walls, and pumps can also interact with the pipe model. This facilitates quick and easy control of the relationships between models under limited professional requirements. It reduces development workload and allows for professional-level element associations. If elements such as doors and windows do not appear in the judgment conditions, it means that it is impossible to pass the pipe through them when drawing the pipe model. Similarly, judgment conditions can be used to filter out objects unrelated to the currently defined second model. All objects not in the judgment conditions will be skipped in the final else statement. In other words, if the first captured object is unrelated to the second object, the drawing will not be executed. This is equivalent to a fool-proofing function.
[0055] As an implementation method, parametrically defined solid models require 3D spatial layout using a tool, which is also a C++ development project. In this project, the system records the 3D spatial location information selected by each mouse click. In addition to recording this location information, the present invention adds functionality to determine whether the mouse has captured a model and retrieve model information, namely the "CRI_ObjectPtr ObjectJudgment(DgnButtonEventCR ev)" method. The formal parameter DgnButtonEventCR ev in this method represents the mouse click event. The present invention uses this event to determine whether a model exists at the capture point. This method also defines the "CRI_ObjectPtr" class, which stores model information, with m_ObjectPtr being an instance of this class. If no model exists at the capture point, m_ObjectPtr is set to null, and the subsequent tool definitions are executed directly (other operations may be performed at this point depending on software development requirements and are not relevant to the present invention). If a model exists at the capture point, m_ObjectPtr is not null, and the model information is stored in the "CRI_ObjectPtr" class. The captured object type is then identified based on a matching table. The matching table here is a logical concept that can be defined or remembered through tables or graphics, and can assist designers and developers in their operations.
[0056] For example, here we use the pipeline system as an example. When drawing the pipeline, as the position of the captured pipeline changes and the position relationship between the old and new pipelines change, models such as elbows, tees, and reducers will be generated. Figure 2As shown, m_ObjectPtr is converted into the corresponding object type one by one according to the matching table. For example, element types: m_oldPipePtr is a pipe element, m_oldElbowPtr is an elbow element, m_oldTeePtr is a tee element, m_oldCrossPtr is a cross element, m_oldReducePtr is a reducer element, and m_oldFlangePtr is a flange element. Model element IDs can be used to identify them, such as Figure 3 As shown, the basic if and else statements are used to determine the type of the captured object. If a type is not empty, it means that there is an object at the mouse capture point and the object is of the corresponding type. Taking the pipe type as an example, the position information and attribute information of the captured pipe can be obtained through m_oldPipePtr:
[0057] CRI_Placement oldPipeplacement = m_oldPipePtr->GetPlacement(); / / Get the placement information of the existing pipe
[0058] m_pipe_DN=m_oldPipePtr->GetPipe_DN(); / / Get the pipe nominal diameter string
[0059] m_oldpipeOD=m_oldPipePtr->GetPipe_OD(); / / Get the outer diameter of the pipe
[0060] m_oldpipeThickness=m_oldPipePtr->GetPipe_Thickness(); / / Get pipe wall thickness
[0061] m_oldpipeLength=m_oldPipePtr->GetPipe_Length(); / / Get the pipe length
[0062] m_oldpipeName = m_oldPipePtr->GetPipe_Name(); / / Get the pipe name
[0063] m_oldpipeClass = m_oldPipePtr->GetPipe_Class(); / / Get pipe type m_oldpipeODSeries = m_oldPipePtr->GetPipe_OD_Series(); / / Get pipe outer diameter series.
[0064] In step S102, based on the object type of the first model and the object type of the second model, the attribute information of the second model is obtained from the custom attribute file, and the attribute information of the second model includes the attribute information of the first model; the custom attribute file is used to define the attribute information of each type of model element, each type of model element corresponds to an object type, and the attribute information of each type of model element includes the attribute information of the associated model element that has an associated relationship with the model element.
[0065] In some embodiments, the models in the current three-dimensional space are all constructed by combining data files with generated models. The data files include a first data file and a second data file. The first data file is used to define the parameters and attribute information of the model elements, and the second data file is used to define the geometric shape and operation effects of the model elements; the first data file includes a first function and a second function. The first function and the second function are used to obtain the attribute information of the associated model elements that have an association relationship with their own model elements from the custom attribute file.
[0066] As an implementation method, the first data file is Data.cpp, the second data file is ElementHandler.cpp, the first function is Add function, and the second function is Get function. That is, when drawing each type of parametric object model, the data file + model generation method is adopted. The data file includes two files, Data.cpp and ElementHandler.cpp; among them, the Data.cpp file is used to define the parameters and properties of the object, and the ElementHandler.cpp file is used to define the geometric shape and operation effect of the object. In the Data.cpp file, add the Add function and the Get function to read and obtain the information of the object that is logically associated with the object from the custom attribute file. Figure 4 As shown, in a custom property file, the relationships between different objects are predefined based on professional or industry characteristics. All object properties are defined and read using the custom property file. By adding Add and Get functions when defining objects, a logical relationship is formed between two objects. This means that the property definition of object A can find object B, allowing it to read its information. Furthermore, object B's information can be defined based on object A, creating an association between the two objects rather than completely independent 3D solid models. Custom property files are in XML format.
[0067] It's important to note that when drawing parametric object models, a data file + model generation approach is used. Specifically, parameters are used to describe the model's geometric features. The model is created by inputting specified parameters, and the generated model's geometry and features can be modified by adjusting these parameters. When drawing parametric object models in MicroStation software, the Smart Element Expression dynamic library (SmartPlantCore.dll) must be invoked. The CRI_GraphicElement class defines methods for adding, displaying, and updating graphic elements; the IECPerDelegateData class defines methods for assigning and modifying model properties, allowing the model's appearance to be controlled by modifying these properties. The CRI_Placement class is used to define the placement information of model elements. Before generating a model, when using Smart Element Expression technology in MicroStation software, the relevant classes (Classes) must be registered. The model's data class, CRI_Motor (Class), derives from the CRI_GraphicElement class (defined and implemented in SmartPlantCore.dll), defining the parameters required to build the model and using them as class variables. Define the variable initialization function (InitDefaultValues) based on the mathematical relationship between the independent and dependent variables. Create a custom attribute file as an EC (Engineering Content) attribute file to define the component properties displayed in the software graphical interface. For example, to achieve the effect of changing the model by modifying the attributes, it is necessary to define the attribute class (Class) - MotorElementECDelegate, which is derived from the ElementECDelegate class. By overriding the _GetValue function, _SetValue function, and _Commit function, the attribute value can be obtained and edited, and the element model can be regenerated according to the attributes in the Commit function. The geometric expression of complex models is mainly implemented in the ElementHandler class. Among them, in MicroStation software, the model placement and addition tool PlaceMotorTool is derived from the DgnPrimitiveTool (basic tool) class.
[0068] This invention aims to achieve intelligent recognition between models, automatic feedback between models, and adaptive modeling. Simply put, it aims to establish associations between models. This requires understanding how specific models can identify object categories, attributes, locations, and other information. For example, when constructing a structural model, the beam and column models should form a logical association between the models, such as the beam resting on the column, rather than simply splicing the beam and column models together.
[0069] Step S103 : Based on the attribute information of the second model, the model information and the position information of the first model, the second model is automatically constructed and assembled with the first model.
[0070] This enables information transfer between models. By logically associating existing models captured (selected by clicking) during modeling to support the new model creation process with the new model, the second model can be automatically constructed and assembled with the first. For example, when placing a flange model at the end of a pipe model, a flange model of the corresponding specification can be automatically generated based on the pipe model's nominal diameter, wall thickness, material, and other information, eliminating the need for manual screening in the flange component library and placement in 3D space.
[0071] It should be noted that adding logical associations between models can also achieve effects such as model linkage. The following describes the model linkage effect.
[0072] In some embodiments, after creating the first model and the second model, the method further includes: in response to a move operation or a zoom operation of the second model clicked by a mouse, adjusting the position information of the first model according to the position information of the second model through a first control function in the second data file; wherein the first control function is used to control the transformation method of the model during movement and zooming when drawing the model and to adjust the position information between logically associated models.
[0073] This enables automatic, real-time feedback between models, effectively implementing model-level operational linkage. For example, if a door model is placed on a wall model, the wall model should automatically create a hole based on the door model's information. Secondly, as the door model moves, the wall model should automatically adjust the hole's position in real time. When the wall model moves, the door model should also move with it, maintaining a fixed relative position relative to the wall model.
[0074] In some embodiments, the position information of the first model is adjusted according to the position information of the second model; including: storing the position information of the second model into the first position variable; and obtaining the modeling base point of the second model from the first position variable; according to the construction method of the second model, obtaining the positional relationship between the second model and the first model when installed; obtaining the placement base point of the first model based on the positional relationship and the modeling base point of the second model; replacing the modeling base point of the second model with the placement base point of the first model, and updating the position information stored in the first position variable; assigning the value of the first position variable to the first model to achieve a linkage effect between the second model and the first model.
[0075] For example, when drawing each parametric object in the ElementHandler.cpp file, there is a function "_OnTransform" used to control the transformation method when the object moves and scales, or the presentation effect. The present invention directly modifies the object and the object B that is associated with the object A in this function. Add the technical code related to the present invention in this function to achieve the linkage effect between this object and other objects. The following takes the water pump and the coupling as an example: in the "_OnTransform" function of the PumpElementHandler.cpp file, the information of the water pump clicked by the mouse is obtained, where the position information of the water pump is stored in the Placement variable; in the "_OnTransform" function of the PumpElementHandler.cpp file, the Get method is used to obtain the information of the coupling clicked by the mouse; the modeling base point origin of the water pump can be obtained from the water pump Placement variable, and the positional relationship between the water pump and the coupling when installed can be obtained according to the three-dimensional modeling method of the water pump, and the coupling placement base point newOrigin can be obtained from the water pump modeling base point through spatial transformation. When changing the coordinate points here, it is also necessary to refer to the axial direction of the water pump model extension in the water pump modeling method to ensure that when the coupling and the water pump are matched in position, in addition to the same positioning points, the matching end faces of the two devices are also on the same plane; use the coupling placement base point newOrigin to replace the water pump modeling base point, and update the water pump's position information Placement variable. At this time, the Placement variable stores the position information of the coupling; using the existing logical association between the water pump and the coupling, assign the Placement variable to the coupling object, achieving the assembly effect of the coupling and the water pump. Each movement of the water pump will trigger the "_OnTransform" function, executing the above position replacement and assignment process, so that the coupling follows the movement of the water pump, and the coupling is always in the correct installation relationship with the water pump.
[0076] This enables the operational linkage of logically related models.
[0077] In some embodiments, based on the attribute information of the second model, the model information and the position information of the first model, automatically constructing the second model and assembling the second model with the first model; including:
[0078] Based on the attribute information of the second model, the model information and position information of the first model, the second model is subjected to a three-dimensional solid cutting operation through the first model, thereby automatically realizing the construction of the second model and the cutting effect between the first model and the second model.
[0079] Therefore, the operation linkage can also achieve the effect of opening holes or cutting models between models. For example, when drawing beam and column models, the effect of the beam resting on the column should be formed between the models, that is, the beam entity extends into the column model, and the repeated part of the two models should have the effect of the column cutting the beam. For example, the "_GeneratePresentation" method in the ElementHandler.cpp file is a function used to finally generate a three-dimensional solid model. In this function, the information of the column model captured by the mouse when drawing the beam model is obtained. At this time, the column model is used to perform a three-dimensional solid cutting operation on the beam model, thus achieving the effect of automatic cutting between models. In structural professional design, this effect is called the back-cut function, which is one of the indispensable functions in structural design. The same is true for model openings.
[0080] The present invention also enables the automatic generation of associated models between two models. For example, when drawing two intersecting pipe models, the two pipe models can be automatically separated based on their model information to generate a three-way or four-way model. When modeling, when one model passes by another, the two models create a spatial interference relationship, i.e., an association between the digitized elements surrounding the spatial path. This is further described below.
[0081] In some embodiments, the method also includes: in response to drawing a third model and the third model is a pipeline model, obtaining model information of all built pipeline models in the current design environment; based on the model information and position information of all built pipeline models and the model information and position information of the third model, determining whether the center line of each built pipeline model in all built pipeline models has an intersection with the center line of the third model; when the center line of the second pipeline model and the third model in all built pipeline models has an intersection, obtaining the angle between the center line of the second pipeline model and the center line of the third model; and adaptively generating a fourth model connecting the third model and the second pipeline model based on the angle between the center line of the second pipeline model and the center line of the third model and the position of the intersection.
[0082] For example, when drawing a new pipeline model, if the new pipeline model intersects with an existing pipeline model in three-dimensional space at an angle of 90°, it is usually necessary to generate a four-way model at the intersection of the two pipelines according to pipeline design specifications.
[0083] In the definition of the tool of the present invention, a corresponding model can be generated between the model information captured by the mouse point and the new object model to be drawn. For example, if the capture point is the starting point of the pipeline model, the angle between the existing pipeline model and the new pipeline model is not 0, and the outer diameter and wall thickness parameters of the two pipeline models are consistent, then the elbow model can be drawn at the capture point to achieve the effect of adaptive connection of the two pipeline models.
[0084] In some embodiments, based on the model information and position information of all the built pipeline models and the model information and position information of the third model, it is determined whether the center line of each built pipeline model in all the built pipeline models has an intersection with the center line of the third model; including: obtaining the spatial occupancy range of the third model according to the position information and model information of the third model; obtaining the spatial occupancy range of the built pipeline model according to the position information and model information of the built pipeline model; determining whether there is an overlapping area between the spatial occupancy range of the third model and the spatial occupancy range of the built pipeline model; and determining whether the center line of each built pipeline model in all the built pipeline models has an intersection with the center line of the third model based on the judgment result of whether there is an overlapping area between the spatial occupancy range of the third model and the spatial occupancy range of the built pipeline model.
[0085] In some embodiments, the fourth model is one of an elbow model, a tee model, a cross model, and a reducer model.
[0086] Therefore, the present invention achieves the effect of real-time perception and adaptive modeling of the modeling process through path recognition or the method of peripheral element recognition. When defining a pipeline system separately, the information of all pipeline models in the current design environment can be obtained in real time, and the model information of all pipeline models can be compared with the model information of the newly drawn pipeline model to determine whether the center lines of the two pipeline models have an intersection. If there is an intersection, it is determined that there is an intersection relationship between the pipeline model and the new pipeline model. The mutual angle between the two pipelines can be further determined to proceed to the next step. The present invention uses the method of global element search and element space occupied comparison to achieve the effect of path recognition.
[0087] It can be understood that each model element in three-dimensional space has a concept of the space occupied by the model element. For example, the gray area of the 90° steel elbow shown in Figure 5(a) represents the space occupied by the elbow. As shown in Figure 5(b), the steel pipe element also has a gray space occupied in three-dimensional space. When drawing a model, it is possible to determine whether the newly drawn model overlaps with the space occupied by other models. If so, the overlap relationship can be determined and information can be obtained. This improves the efficiency of model traversal and judgment, and also provides an entry point for subsequent operations to identify spatial overlap relationships between models.
[0088] As an implementation method, you can define a global element search method AnalysisModel, such as Figure 6As shown, this method includes a double variable, vecRange, which defines the scan range for objects beyond the space occupied by the element. This parameter typically defaults to 0, meaning that two objects are not considered to have a positional interference relationship in 3D space unless their geometric parts collide. The eeh parameter represents the individual object elements in the design environment that participate in path recognition. The scanCallback method is defined for handling spatial interference between models. This method is used to calculate the centerline angle between two linear objects.
[0089] The method for three-dimensional model feature recognition and application based on MicroStation in the embodiment of the present application realizes intelligent auxiliary modeling effects such as recognition between models, adaptive modeling, and model linkage when modeling in three-dimensional space by customizing model attributes and establishing logical associations between models through model attributes.
[0090] In the descriptions of the foregoing embodiments, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are mutually inconsistent.
[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0092] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.
[0093] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0094] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for three-dimensional model feature recognition and application based on MicroStation, characterized in that: The following steps are involved: When drawing a second model that has a structural association relationship with a first model in the current three-dimensional space, clicking the first model with a mouse to obtain model information and position information of the first model; Based on the object type of the first model and the object type of the second model, acquiring attribute information of the second model from a custom attribute file, wherein the attribute information of the second model includes the attribute information of the first model; the custom attribute file is used to define attribute information of each type of model element, each type of model element corresponds to an object type, and the attribute information of each type of model element includes attribute information of associated model elements that have an associated relationship with the model element; Based on the attribute information of the second model, the model information and the position information of the first model, the construction of the second model and the assembly of the second model and the first model are automatically achieved.
2. The method according to claim 1, characterized in that The models in the current three-dimensional space are all constructed by combining data files to generate models, the data files include a first data file and a second data file, the first data file is used to define the parameters and attribute information of the model elements, and the second data file is used to define the geometric shape and operation effect of the model elements; the first data file includes a first function and a second function, the first function and the second function are used to obtain the attribute information of the associated model elements that have an association relationship with their own model elements from the custom attribute file.
3. The method according to claim 1, characterized in that The step of acquiring model information and position information of the first model by clicking the first model with a mouse includes: Obtain a mouse click event, and determine whether a model exists at the mouse capture point through the mouse click event; If a model exists at the mouse capture point, the model-related information obtained by the mouse click event is stored in an information instance of the model information class; Converting the values of the information instances into corresponding object types one by one according to a matching table; the matching table includes correspondences between model elements corresponding to multiple object types and model-related information obtained by mouse clicks; Use if and else judgment statements to determine whether the object type obtained after the conversion is empty. If the object type obtained after the conversion is not empty, it is determined that a model exists at the mouse capture point, and the type of the model is the target object type obtained after the current conversion; Based on the type of the target object, model information and position information of the first model are acquired.
4. The method according to claim 2, characterized in that The method further comprises: In response to a move operation or a zoom operation of the second model clicked by a mouse, the position information of the first model is adjusted according to the position information of the second model through the first control function in the second data file; wherein, the first control function is used to control the transformation method of the model during movement and zooming when drawing the model, and to adjust the position information between logically associated models.
5. The method according to claim 4, characterized in that The adjusting the position information of the first model according to the position information of the second model comprises: Storing the position information of the second model into the first position variable; and obtaining the modeling base point of the second model from the first position variable; According to the construction method of the second model, obtaining a positional relationship between the second model and the first model when they are installed; Acquire a placement base point of the first model according to the positional relationship and the modeling base point of the second model; Replacing the modeling base point of the second model with the placement base point of the first model, and updating the position information stored in the first position variable; The value of the first position variable is assigned to the first model to achieve a linkage effect between the second model and the first model.
6. The method according to claim 2, characterized in that The method of automatically constructing the second model and assembling the second model with the first model based on the attribute information of the second model, the model information and the position information of the first model comprises: Based on the attribute information of the second model, the model information and position information of the first model, the second model is subjected to a three-dimensional solid cutting operation through the first model, thereby automatically realizing the construction of the second model and the cutting effect between the first model and the second model.
7. The method according to claim 1, characterized in that The method further comprises: In response to drawing a third model and the third model being a pipeline model, obtaining model information of all built pipeline models in the current design environment; Based on the model information and position information of all the built pipeline models and the model information and position information of the third model, determining whether a center line of each of all the built pipeline models intersects with a center line of the third model; When a second pipeline model in all built pipeline models has an intersection with the center line of the third model, obtaining an angle between the center line of the second pipeline model and the center line of the third model; A fourth model connecting the third model and the second pipeline model is adaptively generated according to the angle between the center line of the second pipeline model and the center line of the third model and the position of the intersection.
8. The method according to claim 7, characterized in that The step of determining whether a center line of each of all the built pipeline models intersects a center line of the third model based on the model information and location information of all the built pipeline models and the model information and location information of the third model comprises: Acquiring a spatial occupancy range of the third model according to the position information and model information of the third model; Obtaining a spatial occupancy range of the built pipeline model according to the location information and model information of the built pipeline model; Determine whether there is an overlapping area between the spatial occupation range of the third model and the spatial occupation range of the built pipeline model; Based on the judgment result of whether there is an overlapping area between the spatial occupation range of the third model and the spatial occupation range of the built pipeline model, it is determined whether the center line of each built pipeline model in all the built pipeline models has an intersection with the center line of the third model.
9. The method according to claim 7, characterized in that The fourth model is one of an elbow model, a tee model, a cross model and a reducer model.
10. The method according to claim 1, characterized in that The custom attribute file is an XML format file.