A method, apparatus, device, and storage medium for inserting views into drawings.

By inserting views into the drawing, obtaining the initial insertion point of the view, and determining the offset vector, the problem of misaligned projection of view components is solved, thus achieving both aesthetic appeal and ease of processing in the drawing.

CN115391864BActive Publication Date: 2026-04-03SANY CONSTR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In drawings generated by existing design software, the outer contours of component projections in different views cannot be aligned, which makes it easy for technicians to make mistakes during processing and affects the aesthetics of the drawings.

Method used

By obtaining the initial insertion points of multiple views of the target object to be inserted, determining the offset vector, and determining the target insertion point in the drawing based on the initial insertion point and the offset vector, the two-dimensional midpoints of each view are arranged along a preset direction, ensuring the outline alignment of the target component.

Benefits of technology

This makes the drawings more aesthetically pleasing, facilitates processing by technicians, and reduces the possibility of processing errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115391864B_ABST
    Figure CN115391864B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, and storage medium for inserting views into a drawing. The method includes obtaining the initial insertion point of each of a plurality of views to be inserted into a target object within the drawing, with the initial insertion points of each view arranged along a preset direction; then determining an offset vector for each view, which characterizes the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of a target component within the view; obtaining the target insertion point for each view based on the initial insertion point and the offset vector; and inserting the respective views into the drawing based on the target insertion points of each view. Thus, the two-dimensional midpoints of the target components in the inserted views are arranged along the preset direction, meaning the target components in each view are aligned based on the preset direction, making the drawing more aesthetically pleasing and facilitating processing and interpretation by technicians.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer design, and more particularly to a method, apparatus, device, and storage medium for inserting views into drawings. Background Technology

[0002] In existing design software, such as Revit, drawings are typically generated that insert various views of an object, which usually includes components and annotation information located outside the components.

[0003] However, in drawings generated by existing design software, the outer contours of component projections in different views, such as the vertices or top edges of component projections in the left and right views, cannot be aligned. This makes it easy for technicians to make mistakes when processing and interpreting the drawings, and also affects the aesthetics of the drawings. Summary of the Invention

[0004] According to a first aspect of this disclosure, a method for inserting a view within a drawing is provided, the method comprising:

[0005] Obtain the initial insertion point of each of the multiple views to be inserted in the target object within the drawing. The multiple initial insertion points corresponding to the multiple views to be inserted are arranged along a preset direction. The target object includes a target component and annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view within the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view.

[0006] Determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component.

[0007] Based on the initial insertion point and offset vector corresponding to each view, the target insertion point corresponding to each view is determined in the drawing. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing.

[0008] Each view is inserted into the drawing based on the target insertion point corresponding to each view.

[0009] According to a second aspect of this disclosure, an apparatus for inserting views within a drawing is provided, the apparatus comprising:

[0010] The initial insertion point determination module is used to obtain the initial insertion point of each of the multiple views to be inserted of the target object in the drawing. The multiple initial insertion points corresponding to the multiple views to be inserted are arranged along a preset direction. The target object includes a target component and annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view in the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view.

[0011] An offset vector determination module is used to determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component.

[0012] The target insertion point determination module is used to determine the target insertion point corresponding to each view in the drawing based on the initial insertion point and offset vector corresponding to each view. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing.

[0013] The insertion module is used to insert each view into the drawing based on the target insertion point corresponding to each view.

[0014] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the method according to a first aspect of this disclosure.

[0015] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described according to a first aspect of this disclosure.

[0016] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the method described in accordance with a first aspect of this disclosure.

[0017] One or more technical solutions provided in this disclosure involve obtaining the initial insertion point of each of the multiple views to be inserted into the target object within the drawing. The initial insertion points of each view are arranged along a preset direction. Each insertion point is the initial insertion position of the two-dimensional midpoint of the view within the drawing, and this two-dimensional midpoint is the center of the view's minimum bounding box. Then, an offset vector is determined for each view, representing the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. Based on the initial insertion point and offset vector of each view, the target insertion point for each view is obtained. Based on the target insertion points of each view, the respective views are inserted into the drawing. Thus, the two-dimensional midpoints of the target components in the inserted views are arranged along the preset direction, meaning the outlines of the target components in each view are aligned based on the preset direction, making the drawing more aesthetically pleasing and easier for technicians to process and interpret. Attached Figure Description

[0018] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0019] Figure 1 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 1 ;

[0020] Figure 2 A schematic diagram of the initial insertion point corresponding to the view to be inserted, provided as an exemplary embodiment of this disclosure;

[0021] Figure 3 Illustration of the viewport and target component provided for exemplary embodiments of this disclosure Figure 1 ;

[0022] Figure 4 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 2 ;

[0023] Figure 5 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 3 ;

[0024] Figure 6 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 4 ;

[0025] Figure 7 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 5 ;

[0026] Figure 8Illustration of the viewport and target component provided for exemplary embodiments of this disclosure Figure 2 ;

[0027] Figure 9 A schematic block diagram of an apparatus for inserting views into a drawing, provided for exemplary embodiments of this disclosure;

[0028] Figure 10 A schematic block diagram of a chip provided for an exemplary embodiment of this disclosure;

[0029] Figure 11 A schematic block diagram of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation

[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0031] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0032] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0033] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0035] This disclosure provides a method for inserting a view into a drawing. This method can be executed by a terminal device or a server. The terminal device can be a mobile phone, tablet computer, desktop computer, laptop computer, or personal digital assistant (PDA), etc. The server can insert the view. The terminal device and the server interact to realize the function of inserting the view into the drawing. Specifically, the interaction between the terminal device and the server can be achieved through software applications (apps) on the terminal device. The terminal device and the user can interact through one or more of the following methods: keyboard, touchscreen, voice interaction, or handwriting. This disclosure does not limit this.

[0036] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0037] Figure 1 Flow of a method for inserting a view within a drawing provided as an exemplary embodiment of this disclosure Figure 1 ,like Figure 1 As shown, it includes the following steps:

[0038] S101. Obtain the initial insertion point of each of the multiple views to be inserted in the drawing. The multiple initial insertion points of the multiple views to be inserted are arranged along a preset direction. The target object includes the target component and the annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view in the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view.

[0039] In this embodiment of the disclosure, the target object includes the target component and the annotation information on the outside of the target component, which includes at least one of text annotation or dimension annotation.

[0040] This drawing is a graphical representation of engineering practices, showing dimensions, orientations, and technical parameters required for construction. When generating this drawing, various views of the target object are inserted into it. These views are projections of the target object onto a projection plane using orthographic projection. Common views include the front view, left view, right view, top view, and bottom view. Typically, each view has its own independent coordinate system.

[0041] The embodiments disclosed herein do not limit the number of views to be inserted. For example, the number of views to be inserted may be three, such as the front view, left view and right view of the target object, or the front view, top view and bottom view of the target object; or, for example, the number of views to be inserted may be five, such as the front view, left view, right view, top view and bottom view of the target object.

[0042] In this embodiment, the initial insertion point is the initial insertion position of the two-dimensional midpoint of the corresponding view within the drawing, i.e., the two-dimensional midpoint of the corresponding view, which is the center of the view's minimum bounding box. This minimum bounding box, also known as the minimum circumscribed rectangle, is a rectangle defined by the maximum, minimum, maximum, and minimum abscissas of all contents in the view. The minimum bounding box includes all contents in the view, such as target components, text annotations, and dimension annotations. The center coordinates of the minimum bounding box can be calculated based on the aforementioned maximum, minimum, maximum, and minimum abscissas. The center abscissa of the bounding box is the average of the aforementioned maximum and minimum abscissas, and the center ordinate of the bounding box is the average of the aforementioned maximum and minimum ordinates.

[0043] In this embodiment, the initial insertion points of multiple views to be inserted are arranged along a preset direction, that is, the initial insertion points of multiple views to be inserted are aligned along a preset direction. This embodiment does not particularly limit the preset direction. In one embodiment, the preset direction is a single direction, that is, the multiple initial insertion points are arranged along this single direction. For example, when the views to be inserted are a left view, a front view, and a right view, their corresponding initial insertion points are arranged along a single direction; when the views to be inserted are a top view, a front view, and a right view, their corresponding initial insertion points are also arranged along a single direction.

[0044] In another embodiment, the preset direction is two mutually perpendicular directions, such as a first direction and a second direction. Some of the multiple initial insertion points are arranged along the first direction, and others are arranged along the second direction. For example, when the view to be inserted is a left view, a front view, a right view, a top view, and a bottom view, the initial insertion points corresponding to the left view, the front view, and the right view are arranged along the first direction, and the initial insertion points corresponding to the top view, the front view, and the bottom view are arranged along the second direction.

[0045] Figure 2 A schematic diagram of the initial insertion point corresponding to the view to be inserted, provided as an exemplary embodiment of this disclosure, such as... Figure 2As shown, there are five initial insertion points within drawing 21: 221 for the left view, 222 for the front view, 223 for the right view, 224 for the top view, and 225 for the bottom view. Initial insertion points 221, 222, and 223 are arranged along a first direction, while initial insertion points 224, 222, and 225 are arranged along a second direction, with the first direction perpendicular to the second direction. The dashed boxes 231, 232, 233, 234, and 235 represent the viewports of the left, front, right, top, and bottom views after insertion into the drawing, respectively. Each viewport is a rectangular frame formed by the inserted view and can be considered the minimum bounding box of the view. The initial insertion point is the minimum bounding box, i.e., the center of the viewport. It should be noted that in step S101, no view is actually inserted into the drawing. The dashed boxes are used to indicate the viewports of the views to be inserted to show the relative positions of the views after insertion based on the initial insertion points. from Figure 2 It can be seen that the top and bottom edges of the viewports of the left, front, and right views are aligned in the first direction, while the left and right edges of the viewports of the top, front, and bottom views are aligned in the second direction. Since the target object includes the target component and its external annotations, and these annotations are not typically symmetrically distributed along the sides of the target component, the 2D midpoint of the view and the 2D midpoint of the target component within that view often do not coincide. Therefore, when the sides of the viewports of each view are aligned based on the first and second directions, the sides of the target component within each view cannot be aligned based on the first and second directions. Figure 3 As shown, the bottom edges (the lowest vertices) and top edges (or the highest vertices) of the target component in the left, front, and right views are not aligned in the first direction. Similarly, the left edges (or the leftmost vertices) and right edges (or the rightmost vertices) of the target component in the top, front, and right views are not aligned in the second direction. This results in unsightly drawings and makes it easy for technicians to make mistakes during manufacturing.

[0046] This disclosure does not limit the method of obtaining the initial insertion point corresponding to the view to be inserted. For example, an initial insertion point can be set for the view to be inserted based on its type. For example, for the left view, an initial insertion point is assigned to it in a left-hand position, and for the right view, an initial insertion point is assigned to it in a right-hand position. The distance between each initial insertion point can be preset in advance.

[0047] However, it is not limited to this; in another feasible approach, such as... Figure 4 As shown, obtaining the initial insertion point of each of the multiple views to be inserted into the target object within the drawing includes the following steps:

[0048] S401. Get the size of the minimum bounding box for each view.

[0049] The minimum bounding box is a rectangle defined by the maximum and minimum x-coordinates, maximum and minimum y-coordinates of all contents in the view. The width of the minimum bounding box can be obtained by using the maximum and minimum x-coordinates in the view, and the height of the minimum bounding box can be obtained by using the maximum and minimum y-coordinates in the view.

[0050] S402. Obtain the initial insertion point corresponding to the first view, which is any one of multiple views to be inserted.

[0051] The initial insertion point corresponding to the first view is preset. In this step, the preset initial insertion point corresponding to the first view is obtained. The embodiments of this disclosure do not limit the type of the first view. For example, it can be any one of the following: left view, front view, right view, top view, bottom view, and rear view.

[0052] S403. Based on the initial insertion point corresponding to the first view and the size of the minimum bounding box of each view, determine the initial insertion points corresponding to other views among the multiple views to be inserted, wherein the other views are the views other than the first view among the multiple views to be inserted.

[0053] In one specific embodiment, the views to be inserted include a left view, a front view, a right view, a top view, and a bottom view, with the first view being the left view. Based on the initial insertion point corresponding to the first view and the size of the minimum bounding box of each view, the initial insertion points corresponding to the other views among the multiple views to be inserted are determined, such as... Figure 5 As shown, it includes the following steps:

[0054] S501. Move the initial insertion point corresponding to the first view along the first direction by a first distance to obtain the initial insertion point corresponding to the main view. The first distance is related to the size of the minimum bounding box of the first view and the size of the minimum bounding box of the main view.

[0055] In one example, the main view is placed to the right of the left view. After the initial insertion point corresponding to the left view is determined, the initial insertion point corresponding to the left view is moved to the right by a first distance to obtain the initial insertion point corresponding to the main view. This first distance is determined based on the size of the minimum bounding box of the left view and the size of the minimum bounding box of the main view. In a specific example, this first distance is half the width of the minimum bounding box of the left view, plus half the width of the minimum bounding box of the main view, plus a fixed value, which can be preset.

[0056] In other examples, the main view can also be set to the left of the left view. In this case, the initial insertion point corresponding to the left view should be moved to the left by a first distance to obtain the initial insertion point corresponding to the main view.

[0057] S502. Move the initial insertion point corresponding to the main view along the first direction by a second distance to obtain the initial insertion point corresponding to the right view. The second distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the right view.

[0058] In one example, the right view is placed to the right of the main view. After the initial insertion point corresponding to the main view is determined, the initial insertion point corresponding to the main view is moved to the right by a second distance to obtain the initial insertion point corresponding to the right view. This second distance is determined based on the size of the minimum bounding box of the main view and the size of the minimum bounding box of the right view. In a specific example, this second distance is half the width of the minimum bounding box of the main view, plus half the width of the minimum bounding box of the right view, plus a fixed value, which can be preset.

[0059] In other examples, the right view can also be set to the left of the main view. In this case, the initial insertion point corresponding to the main view should be moved to the left by a second distance to obtain the initial insertion point corresponding to the right view.

[0060] S503. Move the initial insertion point corresponding to the main view along the second direction by a third distance to obtain the initial insertion point corresponding to the top view. The third distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the top view. The second direction is perpendicular to the first direction.

[0061] In one example, the top view is positioned above the main view. After the initial insertion point corresponding to the main view is determined, the initial insertion point of the main view is moved upwards by a third distance to obtain the initial insertion point of the top view. This third distance is determined based on the dimensions of the minimum bounding box of the main view and the minimum bounding box of the top view. In a specific example, this third distance is half the height of the minimum bounding box of the main view, plus half the height of the minimum bounding box of the top view, plus a fixed value that can be preset.

[0062] In other examples, the top view can also be placed below the main view. In this case, the initial insertion point corresponding to the main view should be moved down by a third distance to obtain the initial insertion point corresponding to the top view.

[0063] S504. Move the initial insertion point corresponding to the main view by a fourth distance in the opposite direction to the second direction to obtain the initial insertion point corresponding to the bottom view. This fourth distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the bottom view.

[0064] In one example, the bottom view is placed below the main view. After the initial insertion point corresponding to the main view is determined, the initial insertion point corresponding to the main view is moved down by a fourth distance to obtain the initial insertion point corresponding to the bottom view. This fourth distance is determined based on the dimensions of the minimum bounding box of the main view and the minimum bounding box of the bottom view. In a specific example, this fourth distance is half the height of the minimum bounding box of the main view, plus half the height of the minimum bounding box of the bottom view, plus a fixed value, which can be preset.

[0065] In other examples, the bottom view can also be set below the main view. In this case, the initial insertion point corresponding to the main view should be moved up by the fourth distance to obtain the initial insertion point corresponding to the bottom view.

[0066] S102. Determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component.

[0067] The purpose of this step is to determine the offset vector between the two-dimensional midpoint of the view and the two-dimensional midpoint of the component within the view. This disclosure does not limit the method of determining the offset vector; in one feasible approach, such as... Figure 6 As shown, the offset vector corresponding to each view is determined, including:

[0068] S601. Obtain the coordinates of the two-dimensional midpoint of the view.

[0069] This disclosure does not limit the specific method of obtaining the two-dimensional midpoint of the view. For example, the coordinates of the two-dimensional midpoint of each view to be inserted can be obtained separately. The two-dimensional midpoint is the center of the minimum bounding box of the view to be inserted. The minimum bounding box of the view to be inserted is the smallest bounding rectangle with the maximum x-coordinate, minimum x-coordinate, maximum y-coordinate, and minimum y-coordinate of all contents in the view as its boundary. The x-coordinate of its center is the average of the maximum x-coordinate and the minimum x-coordinate, and the y-coordinate of its center is the average of the maximum y-coordinate and the minimum y-coordinate.

[0070] However, this is not the only method. In other embodiments, obtaining the coordinates of the 2D midpoint of the view includes: obtaining the coordinates of the 3D midpoint of the target object, where the 3D midpoint is the center of the minimum bounding box of the target object in 3D space; constructing a transformation matrix based on the world coordinate system of 3D space and the view's corresponding viewing coordinate system; and obtaining the coordinates of the 2D midpoint of the view based on the transformation matrix and the coordinates of the 3D midpoint of the target object. Thus, only one minimum bounding box needs to be constructed—that is, the minimum bounding box of the target object in 3D space—to obtain the 2D midpoints of all views to be inserted, improving the efficiency of obtaining the 2D midpoints of the view.

[0071] The world coordinate system is the absolute coordinate system in the three-dimensional space where the target object is located. In this world coordinate system, every point has an absolute coordinate.

[0072] The observation coordinate system can be considered the observer's local coordinate system, a coordinate system constructed with the observer's position as the origin. It can be understood that for each view to be inserted, there is a corresponding observation coordinate system.

[0073] In one possible implementation, a transformation matrix is ​​constructed based on the world coordinate system in three-dimensional space and the observation coordinate system corresponding to the view. This includes: determining the observation coordinate system corresponding to the view, i.e., determining the observation point of the view and three basis vectors originating from the observation point; the three basis vectors include a right-view basis vector, a top-view basis vector, and a view basis vector, where the right-view basis vector is a basis vector extending to the right from the observation point, the top-view basis vector is a basis vector extending upward from the observation point, and the view basis vector is a basis vector extending away from the view from the observation point; and determining the transformation matrix based on the three basis vectors of the world coordinate system and the three basis vectors of the observation coordinate system.

[0074] In one possible implementation, obtaining the coordinates of the two-dimensional midpoint of the view based on the transformation matrix and the coordinates of the three-dimensional midpoint of the target object includes: multiplying the coordinates of the three-dimensional midpoint of the target object by the transformation matrix to obtain a new coordinate; and taking the first two digits of the new coordinate to obtain the coordinates of the two-dimensional midpoint of the view. For example, assuming the coordinates of the three-dimensional midpoint S of the target object are (x, y, z), and the transformation matrix is ​​P, multiplying the coordinates of the three-dimensional midpoint S by the transformation matrix P to obtain new coordinates (x', y', z'), and taking (x', y') from the coordinates (x', y', z') gives the coordinates of the two-dimensional midpoint of the view.

[0075] S602. Obtain the coordinates of the two-dimensional midpoint of the target component within the view.

[0076] This disclosure does not limit the specific method of obtaining the two-dimensional midpoint of the target component in the view. For example, the coordinates of the two-dimensional midpoint of each target component to be inserted into the view can be obtained separately. The two-dimensional midpoint is the center of the minimum bounding box of the target component. The minimum bounding box of the target component is the smallest bounding rectangle with the maximum x-coordinate, minimum x-coordinate, maximum y-coordinate, and minimum y-coordinate of all contents as its boundary. The x-coordinate of its center is the average of the maximum x-coordinate and the minimum x-coordinate, and the y-coordinate of its center is the average of the maximum y-coordinate and the minimum y-coordinate.

[0077] However, this is not the only method. In other embodiments, obtaining the coordinates of the two-dimensional midpoint of a target component within the view includes: obtaining the coordinates of the three-dimensional midpoint of the target component, where the three-dimensional midpoint is the center of the minimum bounding box of the target component in three-dimensional space; constructing a transformation matrix based on the world coordinate system of three-dimensional space and the viewing coordinate system corresponding to the view; and obtaining the coordinates of the two-dimensional midpoint of the target component within the view based on the transformation matrix and the coordinates of the three-dimensional midpoint of the target component. Thus, only one minimum bounding box needs to be constructed—that is, the minimum bounding box of the target component in three-dimensional space—to obtain the two-dimensional midpoints of all target components to be inserted into the view, improving the efficiency of obtaining the two-dimensional midpoints of the target components.

[0078] The method for obtaining the coordinates of the two-dimensional midpoint of the target component within the view can be found in the method for obtaining the coordinates of the two-dimensional midpoint of the view, and will not be repeated here.

[0079] S603. Subtract the coordinates of the two-dimensional midpoint of the target component within the view from the coordinates of the two-dimensional midpoint of the view to obtain the offset vector corresponding to the view.

[0080] For example, assuming the coordinates of the two-dimensional midpoint of the view are obtained as (X1, Y1) in step S501, and the coordinates of the two-dimensional midpoint of the target component within the view are obtained as (X2, Y2) in step S502, then the offset vector corresponding to this view is (X1-X2). 2, (Y1-Y2).

[0081] S103. Based on the initial insertion point and offset vector corresponding to each view, determine the target insertion point corresponding to each view in the drawing. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing.

[0082] Based on the initial insertion point corresponding to each view obtained in step S101 and the offset vector corresponding to each view determined in step S102, the target insertion point corresponding to each view is obtained.

[0083] In one feasible approach, the target insertion point corresponding to each view is determined, such as... Figure 7 As shown, it includes the following steps:

[0084] S701. Determine a first ratio, which is the ratio of the scaling factor of the drawing to the scaling factor of the view.

[0085] Generally speaking, the scaling ratio of the drawing is different from that of the view. The offset vector determined in step S102 is the offset vector in the view, not the offset vector in the drawing. In order to obtain the offset vector in the drawing, it is necessary to determine the first ratio between the scaling ratio of the drawing and the scaling ratio of the view.

[0086] For example, if the scaling ratio of the drawing is 1:100 and the scaling ratio of the view is 1:25, then the first ratio is 0.25.

[0087] S702. Based on the first ratio and the offset vector corresponding to each view, obtain the actual offset vector of each view within the drawing.

[0088] Continuing with the previous example, if the offset vector corresponding to the view is (X1-X...) 2, If the first ratio is k, then the actual offset vector of the view within the drawing is k(X1-X2). 2, (Y1-Y2).

[0089] S703. Based on the initial insertion point and the actual offset vector of the view, obtain the target insertion point corresponding to the view.

[0090] Specifically, the coordinates of the initial insertion point corresponding to the view are added to the actual offset vector of the view within the drawing to obtain the coordinates of the target insertion point corresponding to the view. For example, assuming the coordinates of the initial insertion point corresponding to the view are (X0, Y0), the actual offset vector of the view is k(X1-X...). 2, Y1-Y2), and (X0,Y0) and k(X1-X 2, Adding (Y1-Y2) gives the coordinates of the target insertion point as (X0+kX1-kX). 2, (Y0+kY1-kY2).

[0091] It is understandable that when the initial insertion position of the two-dimensional midpoint of the view is (X0, Y0), the initial insertion position of the target component in the view should be {X0-(kX1-kX2), Y0-(kY1-kY2)};

[0092] When the target insertion position of the two-dimensional midpoint of the view is (X0+kX1-kX), 2, If the target insertion point is (X0, Y0), then the target insertion position of the target component in the view should be (X0, Y0). That is to say, after the view is offset within the drawing, the two-dimensional midpoint of the target component in the view is the initial insertion point of the view. According to the previous text, the initial insertion points of multiple views to be inserted are arranged along a predetermined direction. Therefore, after the offset, the two-dimensional midpoints of the target components in the multiple views to be inserted are arranged along the preset direction.

[0093] S104. Insert each view into the drawing based on the target insertion point corresponding to each view.

[0094] The two-dimensional midpoints of the target components in each view inserted in the drawing are arranged along a preset direction, that is, the two-dimensional midpoints of the target components in each view are aligned along a preset direction. Visually, the target components in each view are aligned along the preset direction, which makes the drawing more aesthetically pleasing and easier for technicians to read during processing.

[0095] Following the previous example, assuming the preset directions are the first and second perpendicular directions, and the views to be inserted are the left view, front view, right view, top view, and bottom view. Based on the target insertion points corresponding to each view, insert the left view, front view, right view, top view, and bottom view into the drawing, as follows. Figure 8 As shown, the top and bottom edges of the target component in the left, front, and right views are aligned along the first direction, while the left and right edges of the target component in the top, front, and bottom views are aligned along the second direction. At this time, the viewports of each view are no longer aligned.

[0096] The foregoing primarily describes the solutions provided by the embodiments of this disclosure from the perspective of the server. It is understood that, in order to implement the above functions, the server includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0097] This disclosure embodiment can divide the server into functional units according to the above method example. For example, it can divide each function into a separate functional module, or it can integrate two or more functions into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0098] In the case of dividing each functional module according to its corresponding functions, an exemplary embodiment of this disclosure provides an apparatus for inserting a view into a drawing. The apparatus for inserting a view into a drawing can be a server or a chip applied to a server. Figure 9 A schematic block diagram of the functional modules of an apparatus for inserting views into a drawing according to an exemplary embodiment of the present disclosure is shown. Figure 9 As shown, the device 900 includes:

[0099] The initial insertion point determination module 901 is used to obtain the initial insertion point of each of the multiple views to be inserted in the target object in the drawing. The multiple initial insertion points corresponding to the multiple views to be inserted are arranged along a preset direction. The target object includes the target component and the annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view in the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view.

[0100] The offset vector determination module 902 is used to determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component.

[0101] The target insertion point determination module 903 is used to determine the target insertion point of each view in the drawing based on the initial insertion point and offset vector corresponding to each view. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing.

[0102] Insert module 904 is used to insert each view into the drawing based on the target insertion point corresponding to each view.

[0103] In one possible implementation, the initial insertion point determination module 901 is also configured to:

[0104] Get the size of the minimum bounding box for each view;

[0105] Get the initial insertion point corresponding to the first view, which can be any one of multiple views to be inserted;

[0106] Based on the initial insertion point corresponding to the first view and the size of the minimum bounding box of each view, the initial insertion points corresponding to other views among the multiple views to be inserted are determined. The other views are the views other than the first view among the multiple views to be inserted.

[0107] In one possible implementation, the views to be inserted include a left view, a front view, a right view, a top view, and a bottom view, with the first view being the left view; the initial insertion point determination module 901 is also configured to:

[0108] Move the initial insertion point corresponding to the first view a first distance along the first direction to obtain the initial insertion point corresponding to the main view. The first distance is related to the size of the minimum bounding box of the first view and the size of the minimum bounding box of the main view.

[0109] Move the initial insertion point corresponding to the main view along the first direction by a second distance to obtain the initial insertion point corresponding to the right view. The second distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the right view.

[0110] Move the initial insertion point corresponding to the main view a third distance along the second direction to obtain the initial insertion point corresponding to the top view. The third distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the top view. The second direction is perpendicular to the first direction. Move the initial insertion point corresponding to the main view a fourth distance in the opposite direction to the second direction to obtain the initial insertion point corresponding to the bottom view. The fourth distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the bottom view.

[0111] In one possible implementation, the offset vector determination module 902 is also configured to:

[0112] Get the coordinates of the 2D midpoint of the view;

[0113] Obtain the coordinates of the 2D midpoint of the target component within the view;

[0114] The offset vector corresponding to the view is obtained by subtracting the coordinates of the two-dimensional midpoint of the target component within the view from the coordinates of the two-dimensional midpoint of the view.

[0115] In one possible implementation, the offset vector determination module 902 is also configured to:

[0116] Obtain the coordinates of the 3D midpoint of the target object. The 3D midpoint of the target object is the center of the smallest bounding box of the target object in 3D space.

[0117] Construct a transformation matrix based on the coordinate system of the three-dimensional space and the coordinate system of the plane where the view is located;

[0118] Based on the transformation matrix, the coordinates of the 3D midpoint of the target object are converted into the coordinates of the 2D midpoint of the view.

[0119] In one possible implementation, the offset vector determination module 902 is also configured to:

[0120] Obtain the coordinates of the 3D midpoint of the target component. The 3D midpoint of the target component is the center of the minimum bounding box of the target component in 3D space.

[0121] Construct a transformation matrix based on the coordinate system of the three-dimensional space and the coordinate system of the plane where the view is located;

[0122] Based on the transformation matrix, the coordinates of the 3D midpoint of the target component are converted into the coordinates of the 2D midpoint of the target component within the view.

[0123] In one possible implementation, the target insertion point determination module 903 is also configured to:

[0124] Determine the first ratio, which is the ratio of the scaling factor of the drawing to the scaling factor of the view;

[0125] Based on the first ratio and the offset vector corresponding to each view, the actual offset vector of each view within the drawing is obtained;

[0126] Based on the initial insertion point and the actual offset vector of the view, the target insertion point corresponding to the view is obtained.

[0127] Figure 10 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown. Figure 10 As shown, the chip 1000 includes one or more processors 1001 and a communication interface 1002. The communication interface 1002 can support the server in performing the data transmission and reception steps in the above-described image processing method, and the processor 1001 can support the server in performing the data processing steps in the above-described image processing method.

[0128] Optional, such as Figure 10 As shown, the chip 1000 also includes a memory 1003, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).

[0129] In some implementations, such as Figure 10 As shown, processor 1001 executes corresponding operations by calling operation instructions stored in memory (which may be stored in the operating system). Processor 1001 controls the processing operations of any terminal device; processor can also be called a central processing unit (CPU). Memory 1003 may include read-only memory and random access memory, and provides instructions and data to processor 1001. A portion of memory 1003 may also include NVRAM. For example, in applications, memory, communication interfaces, and other components are coupled together via a bus system, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 10 The general labeled all buses as Bus System 1004.

[0130] The methods disclosed in the embodiments of this disclosure can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0131] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform a method according to an embodiment of this disclosure.

[0132] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0133] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0134] refer to Figure 11The present invention describes a structural block diagram of an electronic device 1100 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0135] like Figure 11 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded into a random access memory (RAM) 1103 from a storage unit 1108. The RAM 1103 may also store various programs and data required for the operation of the device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0136] Multiple components in electronic device 1100 are connected to I / O interface 1105, including: input unit 1106, output unit 1107, storage unit 1108, and communication unit 1109. Input unit 1106 can be any type of device capable of inputting information to electronic device 1100. Input unit 1106 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1107 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1108 may include, but is not limited to, disk and optical disk. Communication unit 1109 allows electronic device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0137] The computing unit 1101 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above. For example, in some embodiments, the aforementioned methods can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1100 via ROM 1102 and / or communication unit 1109. In some embodiments, the computing unit 1101 can be configured to perform the aforementioned methods by any other suitable means (e.g., by means of firmware).

[0138] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0139] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0141] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0142] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions of the embodiments of this disclosure are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, a computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0144] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.

Claims

1. A method for inserting views into a drawing, characterized in that, The method includes: Obtain the initial insertion point of each of the multiple views to be inserted in the target object within the drawing. The multiple initial insertion points corresponding to the multiple views to be inserted are arranged along a preset direction. The target object includes a target component and annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view within the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view. Determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component. Based on the initial insertion point and offset vector corresponding to each view, the target insertion point corresponding to each view is determined in the drawing. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing. Each view is inserted into the drawing based on the target insertion point corresponding to each view.

2. The method as described in claim 1, characterized in that, The process of obtaining the initial insertion point of each of the multiple views to be inserted in the target object within the drawing includes: Obtain the size of the minimum bounding box for each view; Obtain the initial insertion point corresponding to the first view, where the first view is any one of the plurality of views to be inserted; Based on the initial insertion point corresponding to the first view and the size of the minimum bounding box of each view, the initial insertion points corresponding to other views among the plurality of views to be inserted are determined, wherein the other views are the views other than the first view among the plurality of views to be inserted.

3. The method as described in claim 2, characterized in that, The views to be inserted include a left view, a front view, a right view, a top view, and a bottom view, with the left view being the first view. Based on the initial insertion point corresponding to the first view and the size of the minimum bounding box of each view, the initial insertion points corresponding to the other views among the plurality of views to be inserted are determined, including: The initial insertion point corresponding to the first view is moved a first distance along the first direction to obtain the initial insertion point corresponding to the main view. The first distance is related to the size of the minimum bounding box of the first view and the size of the minimum bounding box of the main view. The initial insertion point corresponding to the main view is moved a second distance along the first direction to obtain the initial insertion point corresponding to the right view. The second distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the right view. The initial insertion point corresponding to the main view is moved a third distance along the second direction to obtain the initial insertion point corresponding to the top view. The third distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the top view. The second direction is perpendicular to the first direction. The initial insertion point corresponding to the main view is moved a fourth distance in the opposite direction to the second direction to obtain the initial insertion point corresponding to the bottom view. The fourth distance is related to the size of the minimum bounding box of the main view and the size of the minimum bounding box of the bottom view.

4. The method as described in claim 1, characterized in that, Determining the offset vector corresponding to each view includes: Obtain the coordinates of the two-dimensional midpoint of the view; Obtain the coordinates of the two-dimensional midpoint of the target component within the view; The offset vector corresponding to the view is obtained by subtracting the coordinates of the two-dimensional midpoint of the target component within the view from the coordinates of the two-dimensional midpoint of the view.

5. The method as described in claim 4, characterized in that, Obtaining the coordinates of the two-dimensional midpoint of the view includes: Obtain the coordinates of the three-dimensional midpoint of the target object, where the three-dimensional midpoint of the target object is the center of the minimum bounding box of the target object in three-dimensional space; Based on the world coordinate system of the three-dimensional space and the observation coordinate system corresponding to the view, a transformation matrix is ​​constructed; Based on the transformation matrix and the coordinates of the three-dimensional midpoint of the target object, the coordinates of the two-dimensional midpoint of the view are obtained.

6. The method as described in claim 4, characterized in that, Obtaining the coordinates of the two-dimensional midpoint of the target component within the view includes: Obtain the coordinates of the three-dimensional midpoint of the target component, where the three-dimensional midpoint of the target component is the center of the minimum bounding box of the target component in three-dimensional space; Based on the world coordinate system of the three-dimensional space and the observation coordinate system corresponding to the view, a transformation matrix is ​​constructed; Based on the transformation matrix and the coordinates of the three-dimensional midpoint of the target component, the coordinates of the two-dimensional midpoint of the target component within the view are obtained.

7. The method as described in claim 1, characterized in that, The step of determining the target insertion point for each view within the drawing based on the initial insertion point and offset vector corresponding to each view includes: Determine a first ratio, which is the ratio of the scaling factor of the drawing to the scaling factor of the view; Based on the first ratio and the offset vector corresponding to each view, the actual offset vector of each view within the drawing is obtained; Based on the initial insertion point of the view and the actual offset vector, the target insertion point corresponding to the view is obtained.

8. An apparatus for inserting views into a drawing, characterized in that, The device includes: The initial insertion point determination module is used to obtain the initial insertion point of each of the multiple views to be inserted of the target object in the drawing. The multiple initial insertion points corresponding to the multiple views to be inserted are arranged along a preset direction. The target object includes a target component and annotation information located outside the target component. The initial insertion point is the initial insertion position of the two-dimensional midpoint of the view in the drawing. The two-dimensional midpoint of the view is the center of the minimum bounding box of the view. An offset vector determination module is used to determine the offset vector corresponding to each view. The offset vector is used to characterize the relative positional relationship between the two-dimensional midpoint of the view and the two-dimensional midpoint of the target component within the view. The two-dimensional midpoint of the target component is the center of the minimum bounding box of the target component. The target insertion point determination module is used to determine the target insertion point corresponding to each view in the drawing based on the initial insertion point and offset vector corresponding to each view. The target insertion point is the target insertion position of the two-dimensional midpoint of the view in the drawing. The insertion module is used to insert each view into the drawing based on the target insertion point corresponding to each view.

9. An electronic device, comprising: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • System for generating part sign picture and method thereof

    CN101174275A

  • Method, system and device for inserting picture frame and storage medium

    CN111739119A