Method, system, storage medium and equipment for generating three-dimensional axis side view based on BIM
By simplifying the BIM solid model of electromechanical piping into a line model and constructing a cuboid, and combining occlusion judgment and hidden surface removal, the problems of redundant lines and distorted spatial relationships in the existing 3D isometric drawing are solved, and efficient and clear 3D isometric drawing generation is achieved.
Patent Information
- Application Number
- CN202511540056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-27
AI Technical Summary
Existing BIM software suffers from problems such as redundant lines, difficulty in positioning, and distortion of spatial relationships when generating 3D isometric views of electromechanical pipelines. It cannot accurately represent the pipeline route, and manual drawing is inefficient.
By simplifying the BIM solid model of electromechanical piping into a line model, constructing a cuboid and combining it with occlusion judgment, generating the center line in the front view direction, and performing hidden surface removal processing according to the occlusion status, combined with graphic and text adaptation, a clear three-dimensional axonometric system diagram is generated.
It enables the automated generation of 3D isometric views, reduces manual operations, simplifies redundant lines, clearly presents the spatial relationships of pipes, and improves design efficiency and drawing quality.
Smart Images

Figure CN121010723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of BIM modeling, and in particular to a method, system, storage medium and equipment for generating a three-dimensional isometric drawing based on BIM. BACKGROUND
[0002] BIM is a process, technology and method for creating and utilizing digital models to manage and optimize the entire process of design, construction and operation of construction projects. It is a three-dimensional model information integration technology developed on the basis of computer-aided design technology, and is a digitalization and visualization of physical characteristics and functional characteristics of building engineering information.
[0003] A BIM software platform refers to a software platform for implementing building information modeling (BIM) creation, which mainly provides a basic BIM engine to display three-dimensional graphics. The BIM engine has the ability to combine different types of three-dimensional graphics into building, structure, equipment and other professional components in a building, and also provides the ability to set and edit three-dimensional component information properties and statistics.
[0004] A three-dimensional isometric system drawing refers to a single projection viewing angle that can simultaneously reflect the shape of three coordinate planes of an object on one projection plane. It generally uses a viewing angle of any vertex of a spatial hexahedron as the center (as shown in FIG. 1), and is close to human visual habits, with a strong three-dimensional sense, highlighting the three-dimensional image and spatial relationship of the target component. At the same time, due to the change of the three-dimensional viewing angle, the real spatial relationship between BIM models is complex to express. The isometric viewing angle generally does not reflect the actual shape of the surfaces of the object, but only serves as an auxiliary viewing angle to illustrate the spatial situation of the mechanical and electrical branch pipes in the three-dimensional space, and the drawing is made in this viewing angle and reflected in the two-dimensional drawing. Therefore, in BIM forward design, the use of three-dimensional isometric drawing can help engineering designers and construction personnel to conceive and imagine the shape of the object, so as to make up for the shortcomings of the orthographic projection drawing. Figure 1
[0005] At present, the BIM forward design drawing of the mechanical and electrical piping professional in the market is mostly manually drawn in the form of three-dimensional isometric drawing, that is, the three-dimensional model is manually adjusted to observe the angle, and then the labeling and drawing are performed. Even if some software provides the function of automatically generating three-dimensional isometric drawings of mechanical and electrical pipes, the function directly uses the original mechanical and electrical pipe model to draw the drawing, which makes it difficult to handle the simple spatial relationship of the mechanical and electrical pipe model in the three-dimensional isometric viewing angle, and the function cannot completely meet the design requirements. The specific defects are as follows:
[0006] 1. In the field of electromechanical engineering, using direct drawing in three-dimensional axial side view, the three-dimensional BIM model in the view is a solid drawing model, which may cause shielding between different pipes, and the lines of the three-dimensional solid model are too many, resulting in complex and not concise and intuitive spatial relationship of components expressed by the three-dimensional axonometric drawing, and the pipe trend cannot be seen clearly, so model simplification is needed;
[0007] 2. In the process of simplifying the three-dimensional pipe solid model, if it is directly converted into a two-dimensional simple line, the same component may show multiple lines, for example, a single circular pipe may generate multiple lines when converted into a single two-dimensional line, making it difficult to accurately position;
[0008] 3. The program cannot automatically filter out the simplified electromechanical pipeline from the complex three-dimensional model projection lines, because it cannot correctly handle the shielding relationship of the simplified projection lines by using the blanking algorithm (not showing the invisible part in the field of view), and the output pipeline graphics cannot accurately express the actual spatial relationship. SUMMARY
[0009] Therefore, the purpose of the present application is to provide a method, system, storage medium and equipment for generating a three-dimensional axial side view based on BIM, which simplifies the electromechanical pipeline BIM entity model into a line body model and realizes spatial occlusion judgment by combining a cuboid, accurately blanks based on the central line shielding state of the front view direction, solves the problems of line redundancy, positioning difficulty and spatial relationship distortion in the prior art, and greatly improves the BIM forward design efficiency and optimizes the drawing quality.
[0010] The technical scheme adopted by the present application to solve the technical problems is:
[0011] A method for generating a three-dimensional axial side view based on BIM is provided, comprising the following steps:
[0012] S1: obtaining an electromechanical pipeline BIM entity model of a target area; and extracting a longitudinal center positioning line of the electromechanical pipeline BIM entity model, taking the longitudinal center positioning line as a line body model;
[0013] S2: taking one end point of the line body model as a vertex, constructing four squares that are two by two common edges on a plane perpendicular to the line body model, the side length of the square being equal to half of the pipe diameter of the electromechanical pipeline BIM entity model, and the four squares being perpendicular to the three-dimensional axial side view plane;
[0014] S3: extending the four squares along the longitudinal direction of the line body model to the other end point of the line body model, forming four cuboids that are two by two common planes and have the line body model as a common edge line;
[0015] S4: Project the line body model alone to form a center line segment that retains spatial coordinate information, and take the center line segment as an orthographic direction center line parallel to a predetermined three-dimensional axis side perspective direction;
[0016] S5: Determine the occlusion relationship between the four cuboids corresponding to the current mechanical and electrical pipeline and the cuboids obtained by processing other mechanical and electrical pipelines through S1-S3 based on an occlusion mechanism of the original three-dimensional space position coordinate relationship, determine the occlusion state of the orthographic direction center line, the occlusion state including complete occlusion, partial occlusion and no occlusion, and perform blanking processing on the orthographic direction center line according to the occlusion state;
[0017] S6: Assign the state information after the blanking processing to the line body model, realize the binding of the blanking state and the spatial coordinates of the line body model, and generate a three-dimensional axis side system diagram of the mechanical and electrical pipeline.
[0018] The step S5 includes:
[0019] 5.1, call the coordinate reading interface of the BIM underlying engine to obtain the three-dimensional space coordinate data set of the four cuboids corresponding to the current mechanical and electrical pipeline and other mechanical and electrical pipelines respectively;
[0020] 5.2, calculate the projection overlap area of the current cuboid and other cuboids on the three-dimensional axis side view plane based on the projection rule of the three-dimensional axis side perspective;
[0021] 5.3, compare the spatial position relationship between the projection overlap area and the orthographic direction center line: if the projection overlap area completely covers the orthographic direction center line, it is determined as "completely occluded"; if the projection overlap area partially covers the orthographic direction center line, it is determined as "partially occluded"; if the projection overlap area does not cover the orthographic direction center line, it is determined as "not occluded";
[0022] 5.4, perform blanking operation according to the determined occlusion state: when the occlusion state is "completely occluded", remove the orthographic direction center line from the display layer of the three-dimensional axis side system diagram to realize complete blanking; when the occlusion state is "partially occluded", locate the line segment corresponding to the projection overlap area on the orthographic direction center line through coordinate matching, set the display attribute of the line segment to "transparent" to realize blanking; when the occlusion state is "not occluded", keep the original pixel attribute of the orthographic direction center line and do not perform any blanking operation.
[0023] Further comprising a step S7 of performing graphic-text adaptation processing on the generated three-dimensional axis side system diagram of the mechanical and electrical pipeline, and the specific steps are:
[0024] S7.1: Obtain the text box contour of the marked text and the outer boundary contour of the equipment legend in the three-dimensional axial side system diagram, and encapsulate the text box contour and the outer boundary contour as independent integral graphic blocks, respectively;
[0025] S7.2: Determine the occlusion relationship of each integral graphic block and the line body model based on the spatial position relationship of the three-dimensional axial side view angle;
[0026] S7.3: According to the occlusion judgment logic and the blanking operation rule of S5, the line body model part with occlusion relationship with the integral graphic block is blanked to ensure that the marked text and the equipment legend are clearly displayed in the three-dimensional axial side system diagram.
[0027] The step S1 further comprises: receiving three-dimensional axial side view angle parameters input by a user through a BIM software platform, wherein the three-dimensional axial side view angle parameters comprise an observation angle and a viewport range, the observation angle range is 0°-360°, and the viewport range is defined in pixel coordinates.
[0028] In the step S2:
[0029] The normal vectors of the four squares are consistent with the normal vector of the three-dimensional axial side viewport plane corresponding to the viewport range, and the distribution direction of the four squares is adapted to the observation angle, so as to ensure that the cuboids generated are matched with the observation direction of the three-dimensional axial side view angle; adjacent squares share a complete edge, and the geometric centers of the four squares are all coincident with the end points of the line body model, and the central axes of the four squares are collinear with the axis of the line body model.
[0030] The step S3 specifically comprises: uniformly stretching the four squares along the axis direction of the line body model, and the side length and relative position of the square remain unchanged during the stretching process, and the stretching length is consistent with the actual length of the line body model; after stretching, adjacent cuboids share a complete rectangular side surface, and one edge of all the cuboids is completely coincident with the axis of the line body model.
[0031] The system for generating a three-dimensional axial side view based on BIM is used to implement the method for generating a three-dimensional axial side view based on BIM described in any one of the above embodiments, and comprises:
[0032] A model acquisition and simplification module is configured to acquire a mechanical and electrical pipeline BIM entity model of a target area, and extract a longitudinal center positioning line of the mechanical and electrical pipeline BIM entity model, and take the longitudinal center positioning line as a line body model.
[0033] Cuboid construction module: for constructing four squares that share edges two by two with each other on a plane perpendicular to the line body model with one end point of the line body model as a vertex, and extending the four squares along the longitudinal direction of the line body model to the other end point to form four cuboids that share planes two by two and have the line body model as a common side line;
[0034] Front view direction center line generation module: for projecting the line body model alone to form a center line segment that retains spatial coordinate information, and defining the center line segment as a front view direction center line parallel to a predetermined three-dimensional axis side tilt perspective direction;
[0035] Occlusion judgment and blanking module: for judging the occlusion relationship between the four cuboids corresponding to the current mechanical and electrical pipeline and the cuboids corresponding to other mechanical and electrical pipelines based on the occlusion mechanism of the original three-dimensional spatial position coordinate relationship, determining the occlusion state of the front view direction center line, and performing blanking operation on the front view direction center line according to the occlusion state;
[0036] System diagram generation module: for assigning the state information after blanking processing to the line body model, realizing the binding of the blanking state and the spatial coordinates of the line body model, and generating a three-dimensional axis side system diagram of the mechanical and electrical pipeline.
[0037] Further comprising a graphic occlusion adaptation module: for obtaining the text box contour of the labeled text and the outer boundary contour of the device legend in the three-dimensional axis side system diagram and packaging them as an overall graphic block, judging the occlusion relationship between the overall graphic block and the line body model, and triggering the occlusion judgment and blanking module to perform blanking processing on the line body model part that exists occlusion according to the preset logic.
[0038] A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement all steps of the method for generating a three-dimensional axis side diagram based on BIM according to any one of the preceding embodiments.
[0039] An electronic device, comprising a processor, a memory, and a computer program stored on the memory, wherein the processor is connected to the memory through a data bus; when the processor invokes the computer program stored in the memory, all steps of the method for generating a three-dimensional axis side diagram based on BIM according to any one of the preceding embodiments can be executed.
[0040] The beneficial effects of the present application are as follows:
[0041] The application provides a method, system, storage medium and equipment for generating a three-dimensional axial side view based on BIM, which realizes multi-dimensional optimization through a complete technical path of "BIM entity model simplification-assisted cuboid construction-precise judgment of space occlusion-elimination of center line in the front view direction-binding of state and coordinates": first, the problem of low efficiency of manual drawing is solved, the generation process of the axial side view is automated, the longitudinal center positioning line is extracted from the BIM entity model as a line model, and the drawing is automatically completed through the steps of cuboid construction, projection generation of the center line, occlusion judgment and elimination, which greatly reduces the labor cost and improves the efficiency of BIM forward design drawing; second, the problems of line redundancy and serious occlusion of the entity model drawing are solved, the entity model is simplified through the line model, and the occlusion judgment is assisted by four cuboids which are strongly bound with the space position of the pipeline, so that the pipeline trend caused by too many lines of the entity model is avoided, the axial side view is more concise and intuitive, and the spatial relationship of the pipeline is clearly presented; third, the problem of positioning difficulty after model simplification is solved, the four cuboids are collinear with the axis of the line model and the geometric center is coincident, and the length of the cuboid after stretching is consistent with that of the line model, so that the cuboid and the pipeline space position are accurately bound, a reliable space reference is provided for subsequent occlusion judgment and elimination, and the positioning deviation after simplification is avoided; fourth, the defect of space relationship distortion caused by invalid elimination algorithm is overcome, the overlapping area of the cuboid projection is judged based on the original three-dimensional space coordinate relationship, the differential elimination processing is performed in combination with the occlusion state (completely / partially / not occluded) of the center line in the front view direction, the precise operation of whole removal, local transparency or original attribute reservation is realized, and it is ensured that the output axial side system diagram can accurately reflect the actual spatial relationship of the pipeline; in addition, through the elimination processing of the graphic-text adaptation, the labeled text and the equipment legend are packaged as an integral graphic block, the elimination is performed on the part of the line model which is occluded, the graphic-text is clearly displayed, the practicability of the drawing is further improved, the engineering design and construction personnel can more efficiently conceive and understand the pipeline shape and spatial layout, the shortage of the orthographic projection drawing is effectively made up, and the quality of the drawing and the engineering application value are optimized. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 Fig. 1 is a schematic diagram of a cylinder (a) and a cuboid (b) in a three-dimensional axial side view.
[0043] Figure 2 Fig. 2 is a schematic diagram of the state of the pipeline model before simplification and elimination of the application.
[0044] Figure 3 Fig. 3 is a schematic diagram of the state of the elimination processing of the center line in the front view direction of the application.
[0045] Figure 4 Fig. 4 is a logic flow chart of the application. DETAILED DESCRIPTION
[0046] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0047] The disclosed method, system, storage medium and equipment for generating a three-dimensional axial side view based on BIM and the method for generating a three-dimensional axial side view based on BIM have the core of realizing the automatic generation of a three-dimensional axial side system view of mechanical and electrical pipelines through the technical path of “simplifying a BIM entity model → constructing a cuboid → judging spatial occlusion → eliminating a center line in an orthographic direction → binding a state”, and the following will elaborate the specific execution process of the technical solution in detail in combination with the actual scene of a commercial complex underground mechanical and electrical room (including water supply and air conditioning water pipeline) in embodiments, and all operations are realized based on a BIM software platform and a built-in plug-in to ensure that the technical solution can be reproduced by a person of ordinary skill in the art, and the content only develops around the specified reference file.
[0048] Implementation basis
[0049] Software platform: Autodesk Revit 2024 (or a platform with equivalent support for BIM engine and API development) is adopted, and a plug-in developed based on C# language + BIM underlying API (integrating five core modules of “model simplification”, “cuboid construction”, “occlusion judgment”, “elimination processing” and “graph-text adaptation”, and meeting the technical design of “built-in BIM software platform plug-in”) is built-in;
[0050] Hardware environment: the processor is Intel Core i7-13700K, the memory is 32 GB, and the graphics card is NVIDIA RTX 4070, which meets the smoothness requirements of BIM model loading and three-dimensional coordinate calculation;
[0051] Basic data: target area mechanical and electrical pipeline BIM entity model (including complete attributes such as pipeline type, pipe diameter, material, spatial coordinates, and the coordinate system adopts an engineering commonly used coordinate system such as Beijing 54 coordinate system).
[0052] Specific implementation steps: as shown in Figures 2-4
[0053] Step S1: BIM entity model acquisition and line body simplification
[0054] Filter the mechanical and electrical pipeline BIM entity models (such as cylindrical water supply pipes and square air conditioning ducts) in the target area through the FilteredElementCollector class (or equivalent interface) of the BIM software API; call the model attribute interface to extract the "longitudinal center positioning line" of the pipeline (along the pipeline axis, including the start / end three-dimensional coordinates), and define it as a line model (to solve the "entity model line redundancy" problem); obtain the three-axis side view angle parameters - observation angle (0°-360°, such as 30° / 45°) and viewport range (defined in pixels, such as 1920x1080) input by the user through the plug-in, and pass the parameters into the BIM underlying engine to determine the normal vector of the axis side viewport plane (perpendicular to the observation direction).
[0055] Step S2: Auxiliary cuboid construction
[0056] Take any one end point of the line model as the vertex, and draw a square in the plane "perpendicular to the axis of the line model" (such as the XY plane when the line model extends along the Z axis); the four squares are perpendicular to the three-axis side viewport plane (the normal vector is consistent with the normal vector of the viewport plane), and the distribution direction is adapted to the observation angle; adjacent squares share edges (share complete edge length), and the geometric centers of the four squares coincide with the line end point, and the center axis is collinear with the line axis.
[0057] Step S3: Square stretching into cuboid
[0058] Uniformly stretch along the axis direction of the line model, and the edge length and relative position of the square remain unchanged during the stretching process, and the stretching length is consistent with the actual length of the line model; four "two-by-two coplanar" cuboids are formed, and one edge of all the cuboids is completely coincident with the axis of the line model (to ensure that the cuboid is strongly bound to the spatial position of the pipeline).
[0059] Step S4: Front direction center line generation
[0060] Project the line model alone onto the three-axis side viewport plane through the View.Project interface (or equivalent projection function) of the BIM engine; keep the complete spatial coordinate information of the projected line segment, and define the line segment as the front direction center line (parallel to the given axis side inclination angle), which is the only reference for subsequent occlusion judgment.
[0061] Step S5: Occlusion judgment and accurate occlusion
[0062] Call the coordinate reading interface of the BIM underlying engine to extract the three-dimensional spatial coordinate data set (each cuboid contains 8 vertex coordinates) of the "4 cuboids of the current pipeline" and the "4 cuboids of other pipelines after S1-S3 processing"; based on the orthographic projection rule of the three-axis side view angle, calculate the projection range of the current cuboid and other cuboids on the "axis side viewport plane", and then obtain the projection overlap area; compare the spatial position relationship between the "projection overlap area" and the "front direction center line" to determine 3 states: completely blocked: the projection overlap area completely covers the front direction center line; partially blocked: the projection overlap area only covers part of the line segment of the front direction center line; not blocked: the projection overlap area does not cover the front direction center line.
[0063] According to the determination result, perform differentiated processing, such as: completely blocked: remove the front direction center line from the display layer to achieve "complete blanking"; partially blocked: locate the overlapping line segment through coordinate matching and set its display attribute to "transparent (transparency 100%)", only the blocked segment is blanked; not blocked: keep the original pixel attribute of the center line (such as black solid line, line width 0.3mm), do not perform operation.
[0064] Step S6: Blanking state binding and system diagram generation
[0065] Bind the "blanking state" (completely / partially / not blocked) to the corresponding spatial coordinate segment of the line body model through coordinate mapping; the plug-in automatically integrates the line body model and blanking state of all pipelines to generate a mechanical and electrical pipeline three-axis side system diagram in accordance with GB / T50103-2010 "General Drawing Standards", supporting export to DWG format.
[0066] Step S7: Text and picture adaptation blanking processing
[0067] For the blocking problem of labeled text, device legend and pipeline, obtain the "text box outline" of the labeled text and the "outer boundary outline" of the device legend in the system diagram, and encapsulate them as independent "overall graphic blocks" respectively; based on the spatial relationship of the axis side view angle, determine the blocking relationship between the overall graphic block and the line body model; use the blocking judgment logic and blanking rule of S5 to set the line segment of the line body that overlaps with the graphic block to "transparent", ensuring that the text and legend are clearly displayed.
[0068] The specific use method is as follows:
[0069] Taking the generation of the axis side diagram of a cylindrical mechanical and electrical pipeline (DN100 water supply steel pipe) as an example, adapt to the user input three-dimensional axis side view angle parameters (observation angle 30°, viewport range 1920x1080 pixels, viewport plane parallel to the observer's screen), and complete the S1-S7 steps.
[0070] Step S1:
[0071] The plug-in filters and acquires the BIM entity model (cylinder) of "DN100 water supply steel pipe" in the computer room through the FilteredElementCollector class of RevitAPI;
[0072] The model attribute interface is called to extract the longitudinal center positioning line of the pipe (the starting point coordinates X=100.0m, Y=50.0m, Z=-5.0m, and the end point coordinates X=110.0m, Y=50.0m, Z=-5.0m) along the pipe axis direction, and the positioning line is taken as a line model;
[0073] The three-dimensional axis side view angle parameters (observation angle 30°, viewport range 1920x1080 pixels) input by the user are received, and the plug-in automatically transmits the view angle parameters into the underlying engine to determine the normal vector of the axis side viewport plane (perpendicular to the observation direction).
[0074] Step S2:
[0075] A line model starting point (X=100.0m, Y=50.0m, Z=-5.0m) is taken as a vertex, and four squares are constructed on a plane perpendicular to the line model (i.e. XY plane, because the line body extends along the Z axis parallel direction);
[0076] Square parameters:
[0077] Side length: equal to half of the pipe diameter, i.e. 50mm (DN100 pipe inner diameter 100mm);
[0078] Spatial pose: the four squares are all perpendicular to the three-dimensional axis side viewport plane (the normal vector is consistent with the normal vector of the viewport plane), and the distribution direction is adapted to the 30° observation angle;
[0079] Position relationship: adjacent squares share a complete 50mm side length, the geometric centers of the four squares all coincide with the line model starting point, and the center axis is collinear with the line model axis (along the Z axis direction).
[0080] Step S3:
[0081] The four squares are uniformly stretched along the axis direction of the line model (from the starting point X=100.0m to the end point X=110.0m);
[0082] Stretching rule: the side length (50mm) and relative position of the square remain unchanged during the stretching process, and the stretching length is consistent with the actual length of the line model (10m);
[0083] Stretching result: four long rectangular parallelepipeds that are two-by-two coplanar are formed, one edge of all the rectangular parallelepipeds is completely coincident with the line model axis (along the Z axis direction), the cross section of the rectangular parallelepiped is a 50mmx50mm square, and the length is 10m.
[0084] Step S4:
[0085] Project the line model to the three-dimensional axis side viewport plane separately, and keep the spatial coordinate information of the projected line segment through the View.Project interface of the BIM engine;
[0086] Define the projected line segment as the front direction center line, and the direction is parallel to the established 30° axis side inclined view angle direction (the starting point of the line segment is projected coordinate X=500 pixels, Y=300 pixels, and the ending point is projected coordinate X=1500 pixels, Y=300 pixels).
[0087] Step S5:
[0088] 5.1 Coordinate data set acquisition
[0089] Call the coordinate reading interface of the BIM underlying engine to obtain the three-dimensional spatial coordinate data set of the four cuboids of the current DN100 water supply steel pipe and the four cuboids of other pipes (such as DN150 air conditioning water pipe) after S1-S3 processing (each cuboid contains the coordinates of 8 vertices).
[0090] 5.2 Projection overlap area calculation
[0091] Based on the projection rule of the 30° axis side view angle (using the “orthographic projection” algorithm), calculate the projection overlap area of the current water supply steel pipe cuboid and the air conditioning water pipe cuboid on the viewport plane:
[0092] Water supply steel pipe cuboid projection range: pixel coordinates (500, 280)-(1500, 320);
[0093] Air conditioning water pipe cuboid projection range: pixel coordinates (800, 270)-(1200, 330);
[0094] Overlap area: pixel coordinates (800, 280)-(1200, 320).
[0095] 5.3 Occlusion state determination
[0096] Compare the position relationship of the overlap area and the front direction center line (pixel coordinates 500, 300-1500, 300):
[0097] The overlap area (800, 280-1200, 320) partially covers the 800, 300-1200, 300 segment (length 400 pixels, corresponding to the actual pipe length 4m) of the center line, and is determined to be partially occluded.
[0098] 5.4 Execution of blanking operation
[0099] According to the determination result of "partially blocked", the display attribute of the overlapping line segment on the center line (800, 300-1200, 300) is set to "transparent" (transparency 100%) through coordinate matching positioning, realizing local blanking.
[0100] Step S6:
[0101] The state information of "partially blocked (800-1200 pixel segment transparent)" is bound to the corresponding spatial coordinate segment (actual pipeline X=104.0m-Y=50.0m-Z=-5.0m to X=108.0m-Y=50.0m-Z=-5.0m) of the line body model through coordinate mapping;
[0102] The plug-in automatically integrates the line body model and blanking state of all pipelines to generate a three-dimensional shaft side system diagram of mechanical and electrical pipelines, and exports it in DWG format (in accordance with GB / T50103-2010 "General Drawing Standards"), in which the 4m blocked segment of the DN100 water supply steel pipe is displayed transparently, and the remaining 6m maintains the original pixel attribute (black solid line, line width 0.3mm).
[0103] Step S7:
[0104] The text box outline (pixel coordinates 600, 330-700, 350) of the label text "DN100 water supply pipe" and the outer boundary outline (pixel coordinates 1100, 330-1150, 380) of the "gate valve" device legend in the system diagram are encapsulated as independent whole graphic blocks respectively; based on the spatial relationship of the shaft side view angle, the blocking of the graphic blocks and the line body model is judged: the text box outline covers the 650, 300-680, 300 segment of the center line (corresponding to 0.3m of the actual pipeline); the device legend outline does not cover the center line; according to the blanking rule of S5, the 650, 300-680, 300 segment of the center line is set to "transparent", ensuring that the label text is clearly displayed and avoiding graphic occlusion.
[0105] Finally, it should be noted that: the above only describes the preferred embodiments of the present application, which are used to illustrate the technical solutions of the present application, and are not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application is included in the protection scope of the present application.
Claims
1. A method for generating a three-dimensional axonometric view based on BIM, characterized in that: The method comprises the following steps: S1: Obtain the electromechanical pipeline BIM entity model of the target area; and extract the longitudinal center positioning line of the electromechanical pipeline BIM entity model, and take the longitudinal center positioning line as a line body model; S2: Take one end point of the line body model as a vertex, and construct four squares that are two by two co-edges on a plane perpendicular to the line body model, the side length of the square is equal to half of the pipe diameter of the electromechanical pipeline BIM entity model, and the four squares are all perpendicular to the three-dimensional axis side viewport plane; S3: Extend the four squares along the longitudinal direction of the line body model to the other end point of the line body model to form four cuboids that are two by two coplanar and have the line body model as a common edge line; S4: Project the line body model separately to form a center line segment that retains spatial coordinate information, take the center line segment as a front view direction center line, and the front view direction center line is parallel to the established three-dimensional axis side oblique viewing angle direction; S5: Based on the occlusion mechanism of the original three-dimensional space position coordinate relationship, judge the occlusion relationship between the four cuboids corresponding to the current electromechanical pipeline and the cuboids obtained after S1-S3 processing of other electromechanical pipelines, determine the occlusion state of the front view direction center line, the occlusion state includes complete occlusion, partial occlusion and non-occlusion, and perform the blanking processing on the front view direction center line according to the occlusion state; S6: Assign the state information after the blanking processing to the line body model, realize the binding of the blanking state and the spatial coordinates of the line body model, and generate the electromechanical pipeline three-dimensional axis side system diagram.
2. The method of generating three-dimensional axonometric views based on BIM of claim 1, wherein: The step S5 comprises: 5.1, call the coordinate reading interface of the BIM bottom engine, and obtain the three-dimensional space coordinate data set of the four cuboids corresponding to the current electromechanical pipeline and other electromechanical pipelines respectively; 5.2, based on the projection rule of the three-dimensional axis side viewing angle, calculate the projection overlapping area of the current cuboid and other cuboids on the three-dimensional axis side viewport plane; 5.3, compare the spatial position relationship between the projection overlapping area and the front view direction center line: if the projection overlapping area completely covers the front view direction center line, it is determined as "complete occlusion"; if the projection overlapping area partially covers the front view direction center line, it is determined as "partial occlusion"; if the projection overlapping area does not cover the front view direction center line, it is determined as "non-occlusion"; 5.4, according to the determined occlusion state, perform the blanking operation: when the occlusion state is "complete occlusion", remove the front view direction center line from the display layer of the three-dimensional axis side system diagram to realize the whole segment blanking; when the occlusion state is "partial occlusion", locate the line segment corresponding to the projection overlapping area on the front view direction center line through coordinate matching, set the display attribute of the line segment to "transparent" to realize the blanking; when the occlusion state is "non-occlusion", keep the original pixel attribute of the front view direction center line, and do not perform any blanking operation.
3. The method of generating three-dimensional axonometric views based on BIM of claim 1, wherein: Further comprising a step S7: performing graphic-text adaptation processing on the generated electromechanical pipeline three-dimensional axis side system diagram, and the specific steps are: S7.1: Obtain the text box contour of the marked text and the outer boundary contour of the equipment legend in the three-dimensional axial side system diagram, and encapsulate the text box contour and the outer boundary contour as independent integral graphic blocks, respectively; S7.2: Determine the occlusion relationship between each integral graphic block and the line body model based on the spatial position relationship of the three-dimensional axial side view angle; S7.3: According to the occlusion judgment logic and the blanking operation rule of S5, the line body model part with the occlusion relationship with the integral graphic block is blanked to ensure that the marked text and the equipment legend are clearly displayed in the three-dimensional axial side system diagram.
4. The method for generating three-dimensional axonometric views based on BIM of claim 1, wherein: In step S1, the three-dimensional axial side view angle parameters input by the user through the BIM software platform are also received, the three-dimensional axial side view angle parameters including an observation angle and a viewport range, the observation angle range being 0°-360°, and the viewport range being defined in pixel coordinates.
5. The method for generating three-dimensional axonometric views based on BIM of claim 4, wherein: In step S2: The normal vectors of the four squares are consistent with the normal vector of the three-dimensional axial side viewport plane corresponding to the viewport range, and the distribution direction of the four squares is adapted to the observation angle, so as to ensure that the cuboid is generated and matched with the observation direction of the three-dimensional axial side view angle; adjacent squares share a complete edge, and the geometric centers of the four squares are coincident with the end points of the line body model, and the central axes of the four squares are collinear with the axis of the line body model.
6. The method for generating three-dimensional axonometric views based on BIM of claim 1, wherein: In step S3, the four squares are uniformly stretched along the axis direction of the line body model, the side length and relative position of the square remain unchanged during the stretching process, and the stretching length is consistent with the actual length of the line body model; after stretching, adjacent cuboids share a complete rectangular side, and one edge of all cuboids is completely coincident with the axis of the line body model.
7. System for generating three-dimensional axonometric views based on BIM, characterized by: The method for generating a three-dimensional axial side view based on BIM according to any one of claims 1-6, Comprises: A model acquisition and simplification module for acquiring a mechanical and electrical pipeline BIM entity model of a target area, and extracting a longitudinal center positioning line of the mechanical and electrical pipeline BIM entity model, and taking the longitudinal center positioning line as a line body model; A cuboid construction module for constructing four squares that share edges in pairs on a plane perpendicular to the line body model with one end point of the line body model as a vertex, and extending the four squares along the longitudinal direction of the line body model to the other end point to form four cuboids that share faces in pairs and have the line body model as a common edge line; An orthoview direction center line generation module for projecting the line body model separately to form a center line segment that retains spatial coordinate information, and defining the center line segment as an orthoview direction center line parallel to a predetermined three-dimensional axial side inclined view angle direction; An occlusion judgment and blanking module for determining the occlusion relationship between the four cuboids corresponding to the current mechanical and electrical pipeline and the cuboids corresponding to other mechanical and electrical pipelines based on the occlusion mechanism of the original three-dimensional spatial position coordinate relationship, determining the shielding state of the orthoview direction center line, and performing a blanking operation on the orthoview direction center line according to the shielding state; The system diagram generation module is configured to assign the state information after the blanking processing to the line body model, bind the blanking state and the line body model space coordinate, and generate a three-dimensional shaft side system diagram of the mechanical and electrical pipeline.
8. The system for generating three-dimensional axonometric views based on BIM according to claim 7, characterized in that, The graphic-text occlusion adaptation module is configured to obtain a text box contour of a marked text and an outer boundary contour of a device legend in the three-dimensional shaft side system diagram, encapsulate the text box contour and the outer boundary contour as an overall graphic block, judge an occlusion relationship between the overall graphic block and the line body model, and trigger the occlusion judgment and blanking module to perform blanking processing on a line body model part with occlusion according to a preset logic.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement all steps of the method for generating a three-dimensional shaft side diagram based on BIM according to any one of claims 1-6.
10. An electronic device, comprising: The processor, the memory, and the computer program stored on the memory are included, the processor is connected with the memory through a data bus, and the processor can execute all steps of the method for generating a three-dimensional shaft side diagram based on BIM according to any one of claims 1-6 when the computer program stored in the memory is called.
Citation Information
Patent Citations
BIM (Building Information Modeling)-based field-of-view shielding area rapid identification method and equipment
CN117911941A
Occlusion reducing transformations for three-dimensional detail-in-context viewing
US20020122038A1