Disclosure of Invention
The present application is directed to solving at least one of the technical problems existing in the related art. Therefore, the application provides a design drawing synchronization method which can improve the drawing efficiency of the design drawing.
The application also provides a design drawing synchronization device, electronic equipment, a storage medium and a computer program product.
According to an embodiment of the first aspect of the application, a design drawing synchronization method comprises the following steps:
the method comprises the steps of obtaining a design drawing to be processed, wherein the design drawing to be processed comprises a design schematic diagram and an initial printed circuit board diagram generated based on the design schematic diagram;
Determining at least one target device from a design schematic in the design drawing to be processed based on device selection operation on the design schematic;
determining the relative position of each target device in the design schematic;
and respectively carrying out position adjustment on the corresponding device of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative position of each target device to obtain the target printed circuit board diagram.
According to the design drawing synchronization method provided by the embodiment of the application, after the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed generated based on the design schematic diagram is obtained, at least one target device is determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the to-be-processed design drawing, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing can be quickly adjusted according to the relative position corresponding to each target device, so that the situation that each device needs to be searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
According to one embodiment of the present application, in determining the relative position of each target device in the design schematic, the following operations are performed separately for each target device:
Determining first device coordinates and first device direction information of a current target device;
determining first size information of the design schematic;
And determining the relative position of the current target device in the design schematic diagram according to the first device coordinate, the first device direction information and the first size information.
According to one embodiment of the present application, when the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing is respectively adjusted according to the corresponding relative position of each target device, the following operations are respectively executed for each target device:
Determining second size information of an initial printed circuit board diagram in the to-be-processed design drawing;
Determining second device coordinates and second device direction information of a corresponding device of the current target device in the initial printed circuit board diagram according to the second size information and the relative position of the current target device in the design schematic diagram;
And based on the second device coordinates and the second device direction information, performing position adjustment on a device corresponding to the current target device in the initial printed circuit board diagram.
According to one embodiment of the present application, after obtaining a design drawing to be processed and before determining at least one target device from a design schematic in the design drawing to be processed based on a device selection operation on the design schematic, further comprising:
determining a first file storage path of an initial printed circuit board diagram and a second file storage path of a design schematic diagram in the to-be-processed design drawing;
Determining a first file name of an initial printed circuit board diagram and a second file name of a design schematic diagram in the to-be-processed design drawing;
And if the first file storage path is consistent with the second file storage path and the first file name and the second file name have the same file name prefix, executing the device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
According to one embodiment of the present application, after determining that the first file storage path is consistent with the second file storage path and that the first file name and the second file name have the same file name prefix, and before determining at least one target device from a design schematic in the design drawing to be processed based on a device selection operation on the design schematic, further comprising:
determining the number of initial printed circuit board diagrams in the to-be-processed design drawing;
And if the number of the initial printed circuit board graphs is equal to the preset number threshold, executing the device selection operation based on the design schematic diagram in the to-be-processed design drawing, and determining at least one target device from the design schematic diagram.
According to one embodiment of the present application, after determining at least one target device from a design schematic in the design schematic based on a device selection operation of the design schematic in the design drawing to be processed, and before determining a relative position of each target device in the design schematic, the method further comprises:
aiming at each target device, device information comparison is carried out in the initial printed circuit board diagram to obtain a comparison result;
And if the comparison result shows that each target device has devices with the same device information in the initial printed circuit board diagram, executing the device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
According to an embodiment of the present application, the comparing device information in the initial printed circuit board diagram for each target device to obtain a comparison result includes:
According to the device position number of each target device, device position number comparison is carried out in the initial printed circuit board diagram respectively, and a first result is obtained;
According to the device package name of each target device, device package name comparison is carried out in the initial printed circuit board diagram respectively, and a second result is obtained;
and generating a comparison result based on the first result and the second result.
According to a second aspect of the present application, a design drawing synchronization device includes:
The device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a design drawing to be processed, the design drawing to be processed comprises a design schematic diagram and an initial printed circuit board diagram generated based on the design schematic diagram, and all devices in the initial printed circuit board diagram are randomly placed;
the first determining module is used for determining at least one target device from the design schematic diagram based on device selection operation on the design schematic diagram in the design drawing to be processed;
A second determining module, configured to determine a relative position of each target device in the design schematic diagram;
and the adjusting module is used for respectively carrying out position adjustment on the corresponding device of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative position of each target device to obtain the target printed circuit board diagram.
An electronic device according to an embodiment of the third aspect of the present application includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the design drawing synchronization method as described in any one of the above when executing the program.
A storage medium according to an embodiment of the fourth aspect of the present application is a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of synchronizing design drawings as described in any of the above.
A computer program product according to an embodiment of the fifth aspect of the present application comprises a computer program which, when executed by a processor, implements a method of synchronizing design drawings as described in any of the above.
The above technical solutions in the embodiments of the present application have at least one of the following technical effects:
the situation that each device needs to be searched and adjusted one by an engineer can be avoided, drawing adjustment time is effectively shortened, and efficiency of the engineer in drawing design drawings can be improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Detailed Description
Embodiments of the present application are described in further detail below with reference to the accompanying drawings and examples. The following examples are illustrative of the application but are not intended to limit the scope of the application.
In the description of the embodiments of the present application, it should be noted that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the embodiments of the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In describing embodiments of the present application, it should be noted that, unless explicitly stated or limited otherwise, the terms "connected," "connected," and "coupled" should be construed broadly, and may be, for example, fixedly connected, detachably connected, integrally connected, mechanically connected, electrically connected, directly connected, or indirectly connected via an intermediate medium. The specific meaning of the above terms in embodiments of the present application will be understood in detail by those of ordinary skill in the art.
In embodiments of the application, unless expressly specified and limited otherwise, a first feature "up" or "down" on a second feature may be that the first and second features are in direct contact, or that the first and second features are in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Referring to fig. 1, fig. 1 is a schematic flow chart of a design drawing synchronization method according to an embodiment of the application, as shown in fig. 1, the design drawing synchronization method includes:
Step 110, obtaining a design drawing to be processed.
It should be noted that, the execution body of the design drawing synchronization method provided in the embodiment of the present application may be a server, a computer device, such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), or the like.
The execution main body of the application can be provided with design drawing synchronization software, and the design drawing management software can be connected with a design drawing synchronization device or can be communicated with the design drawing synchronization device, so that the design drawing synchronization method can be realized by controlling the design drawing synchronization device.
When a user creates an engineering file, a blank schematic diagram and a blank PCB diagram are needed under the engineering file.
In the process of designing hardware, after designing the schematic diagram, an engineer or other user needs to introduce the schematic diagram device into the PCB diagram. The placement of the devices shown in the PCB after the introduction is irregular.
Therefore, the application can obtain a designated design schematic diagram and a PCB diagram obtained by device derivation based on the design schematic diagram as the design drawing to be processed. The PCB diagram directly derived from the device of the design schematic diagram may be defined as an initial printed circuit board diagram, and each device in the initial printed circuit board diagram is randomly placed.
Further, the application can carry out drawing verification on the design schematic diagram and the corresponding PCB diagram.
At step 120, at least one target device is determined from the design schematic based on the device selection operation of the design schematic in the design drawing to be processed.
It can be understood that, in the application, a user can perform a device selection operation in the design schematic diagram of the design drawing to be processed, so as to select one or more devices needing to transmit relative positions, and after the selection is completed, the software is started to perform the operation.
Therefore, after the design schematic diagram and the PCB diagram corresponding to the design schematic diagram pass through the drawing verification, the method can determine each device selected in the design schematic diagram as a target device based on the device selection operation of the design schematic diagram in the design drawing to be processed by a user.
At step 130, the relative position of each target device in the design schematic is determined.
After determining the target devices, the application can determine the relative positions of the target devices in the design schematic diagram for each target device.
Specifically, the relative position of the corresponding target device in the design schematic diagram can be determined by combining the device information of each target device with the size information of the design schematic diagram.
And 140, respectively carrying out position adjustment on the corresponding devices of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative positions of each target device to obtain the target printed circuit board diagram.
After the relative position of each target device in the design schematic diagram is obtained, the application can determine the information of the position of the corresponding device of the target device in the initial printed circuit board diagram according to the relative position of each target device and the size information of the initial printed circuit board diagram, and adjust the position of the corresponding device of the target device in the initial printed circuit board diagram according to the information.
And after the position adjustment of all the target devices in the corresponding devices in the initial printed circuit board diagram is completed, determining the obtained printed circuit board diagram as the target printed circuit board diagram.
Therefore, devices can be placed in the PCB according to the relative positions of the design principle diagram, so that engineers can save the time for searching the devices, quickly and accurately capture the devices wanted by the engineers, the efficiency of the users in drawing is improved, and the user experience is improved.
After the position adjustment of the corresponding devices of all the target devices in the initial printed circuit board diagram is completed, each device can be hovered at the position of the mouse of the user in a selected mode. The user only needs to select a proper place and then click the left button of the mouse to put down the selected device. Thus, a user can place each device at a position convenient to design in the PCB diagram.
According to the design drawing synchronization method provided by the embodiment of the application, after the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed generated based on the design schematic diagram is obtained, at least one target device is determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the to-be-processed design drawing, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing can be quickly adjusted according to the relative position corresponding to each target device, so that the situation that each device needs to be searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
Based on the above embodiment, in determining the relative position of each target device in the design schematic, the following operations are performed for each target device, respectively:
Step 131, determining the first device coordinates and the first device direction information of the current target device;
step 132, determining first dimension information of a design schematic;
And step 133, determining the relative position of the current target device in the design schematic diagram according to the first device coordinates, the first device direction information and the first size information.
When the relative position of each target device in the design schematic diagram is determined, aiming at the target device which is currently being processed, the device coordinate of the current target device in the design schematic diagram can be obtained to serve as the first device coordinate, and the device direction information of the current target device in the design schematic diagram can be obtained to serve as the first device direction information.
Further, the present application may also acquire the size information of the design schematic diagram as the first size information.
After the first device coordinate, the first device direction information and the first size information of the design schematic diagram of the current target device are obtained, the relative position of the current target device in the design schematic diagram can be directly determined.
Based on the same processing mode, the relative positions of the target devices in the design schematic diagram can be determined respectively.
According to the application, after the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed and generated based on the design schematic diagram is obtained, and at least one target device is determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the to-be-processed design drawing, the relative position of each target device in the design schematic diagram can be determined, and further, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing can be quickly adjusted according to the corresponding relative position of each target device, so that the situation that each device needs to be searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
Based on the above embodiment, when the corresponding device of the initial printed circuit board diagram in the design drawing to be processed is adjusted according to the corresponding relative position of each target device, the following operations are performed for each target device respectively:
Step 141, determining second size information of an initial printed circuit board diagram in a design drawing to be processed;
step 142, determining second device coordinates and second device direction information of a corresponding device of the current target device in the initial printed circuit board diagram according to the relative positions of the second size information and the current target device in the design schematic diagram;
and step 143, performing position adjustment on the device corresponding to the current target device in the initial printed circuit board diagram based on the second device coordinate and the second device direction information.
According to the application, when the positions of the corresponding devices of the initial printed circuit board diagram in the design drawing to be processed are respectively adjusted according to the corresponding relative positions of each target device, the size information of the initial printed circuit board diagram in the design drawing to be processed can be obtained as the second size information for the target device which is currently being processed.
Further, according to the obtained second size information and the relative position of the current target device in the design schematic diagram, the second device coordinate and the second device direction information of the corresponding device of the current target device in the initial printed circuit board diagram can be directly determined.
Further, after the second device coordinate and the second device direction information are obtained, the device corresponding to the current target device in the initial printed circuit board diagram is adjusted from the original coordinate to the second device coordinate position and the original direction to the direction corresponding to the second device direction information, so that the position adjustment of the device corresponding to the current target device is completed.
Based on the same processing mode, the position of the device corresponding to each target device in the initial printed circuit board diagram can be adjusted respectively.
According to the application, after the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed generated based on the design schematic diagram is obtained, at least one target device is determined from the design schematic diagram through the device selection operation according to the design schematic diagram in the to-be-processed design drawing, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing can be quickly adjusted according to the corresponding relative position of each target device, so that the situation that each device needs to be searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
Based on the above embodiment, after the to-be-processed design drawing is acquired, and before the device selection operation based on the design schematic in the to-be-processed design drawing, determining at least one target device from the design schematic, further includes:
Determining a first file storage path of an initial printed circuit board diagram and a second file storage path of a design schematic diagram in a to-be-processed design drawing;
determining a first file name of an initial printed circuit board diagram and a second file name of a design schematic diagram in a to-be-processed design drawing;
And if the first file storage path is consistent with the second file storage path and the first file name and the second file name have the same file name prefix, executing device selection operation based on a design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
The method and the device can acquire the first file storage path of the initial printed circuit board diagram in the design drawing to be processed and acquire the second file storage path of the design schematic diagram.
The application can also obtain the first file name of the initial printed circuit board diagram in the design drawing to be processed and the second file name of the design schematic diagram. It should be noted that, the file name in the present application may be composed of a file name prefix and a file name extension.
Therefore, after the first file storage path of the initial printed circuit board diagram in the to-be-processed design drawing and the second file storage path of the design schematic diagram are obtained, and the first file name of the initial printed circuit board diagram in the to-be-processed design drawing and the second file name of the design schematic diagram are obtained, the first file storage path of the initial printed circuit board diagram in the to-be-processed design drawing and the second file storage path of the design schematic diagram can be compared, and the first file name of the initial printed circuit board diagram in the to-be-processed design drawing and the second file name of the design schematic diagram can be compared.
If the comparison determines that the first file storage path is consistent with the second file storage path and the first file name and the second file name have the same file name prefix, the design schematic diagram and the PCB diagram can be determined to belong to the same engineering project.
Thus, a step of determining at least one target device from the design schematic based on the device selection operation of the design schematic in the design drawing to be processed may be performed. Specifically, each device selected in the design schematic may be determined as the target device based on a device selection operation of the design schematic in the design drawing to be processed by the user.
If the comparison determines that the first file storage path is inconsistent with the second file storage path and the first file name and the second file name do not have the same file name prefix, the design schematic diagram and the PCB diagram can be determined not to belong to the same engineering project, so that relevant prompt information for prompting the abnormality of the engineering project can be output.
In the application, whether the PCB with the same file name prefix exists in the file storage path of the design schematic diagram can also be directly inquired, so that the same engineering project corresponding to the design schematic diagram and the PCB is determined.
According to the application, under the condition that the design schematic diagram and the PCB diagram belong to the same engineering project, at least one target device is automatically determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the design drawing to be processed, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the design drawing to be processed can be quickly adjusted according to the corresponding relative position of each target device, so that the condition that each device is searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively reduced, and the efficiency of the engineer in drawing the design drawing can be improved.
Based on the above embodiment, after determining that the first file storage path is consistent with the second file storage path and that the first file name and the second file name have the same file name prefix, and before determining at least one target device from the design schematic based on the device selection operation of the design schematic in the design drawing to be processed, the present application further includes:
determining the number of initial printed circuit board graphs in a to-be-processed design drawing;
and if the number of the initial printed circuit board diagrams is determined to be equal to the preset number threshold, executing a device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
The application determines that the design schematic diagram and the PCB diagram belong to the same engineering project after determining that the first file storage path is consistent with the second file storage path and the first file name and the second file name have the same file name prefix, the application can further determine whether the PCB is unique, so that the number of the initial PCB in the to-be-processed design drawing can be determined, namely, the number of the PCB in the same engineering project as the design schematic in the to-be-processed design drawing can be queried.
Further, the number of the determined initial printed circuit board patterns can be compared with a preset number threshold (1 in the application), and if the number of the determined initial printed circuit board patterns is equal to the preset number threshold, it can be determined that the PCB patterns in the to-be-processed design drawing, which are in the same engineering project as the design schematic, are unique. Thus, a step of determining at least one target device from the design schematic is performed based on the device selection operation of the design schematic in the design drawing to be processed. Specifically, each device selected in the design schematic may be determined as the target device based on a device selection operation of the design schematic in the design drawing to be processed by the user.
If the number of the initial printed circuit board diagrams is determined to be larger than the preset number threshold, it can be determined that the PCB diagrams in the same engineering project as the design schematic in the to-be-processed design drawing are not unique. Therefore, the application can output the related prompt information for prompting the abnormal quantity of the PCB images, does not limit the prompt information specifically, and can be set according to the actual requirements.
According to the application, under the condition that the design schematic diagram and the PCB diagram belong to the same engineering project and the PCB diagram is unique, at least one target device is automatically determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the design schematic diagram to be processed, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the design schematic diagram to be processed can be rapidly adjusted according to the corresponding relative position of each target device, so that the situation that each device is searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively reduced, and the efficiency of the engineers in drawing the design schematic diagram can be improved.
Based on the above embodiment, after determining at least one target device from the design schematic based on the device selection operation of the design schematic in the design drawing to be processed, and before determining the relative position of each target device in the design schematic, further comprising:
aiming at each target device, device information comparison is carried out in an initial printed circuit board diagram to obtain a comparison result;
And if the comparison result shows that each target device has devices with the same device information in the initial printed circuit board diagram, executing device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
According to the application, after at least one target device is determined from the design schematic diagram based on the device selection operation of the design schematic diagram in the design drawing to be processed, device information comparison can be performed in the initial printed circuit board diagram for each target device, so that a comparison result is obtained. The device information comparison in the application can comprise device bit number comparison and device package name comparison.
After the device information comparison is completed, if it is determined that each target device has a device with the same device information in the initial printed circuit board diagram as a result of the comparison, it is determined that the selected device in the design schematic diagram has a device in the PCB diagram, and thus the step of determining the relative position of each target device in the design schematic diagram may be performed.
Further, for each target device, device information is compared in the initial printed circuit board diagram to obtain a comparison result, which includes:
According to the device position number of each target device, device position number comparison is carried out in the initial printed circuit board diagram respectively, and a first result is obtained;
According to the device package name of each target device, device package name comparison is carried out in the initial printed circuit board diagram respectively, and a second result is obtained;
and generating a comparison result based on the first result and the second result.
When the device information comparison is respectively carried out in the initial printed circuit board diagram aiming at each target device to obtain the comparison result, the device bit number comparison can be respectively carried out in the initial printed circuit board diagram according to the device bit number of each target device to obtain the first result of whether the corresponding devices with the same device bit number exist in the initial printed circuit board diagram of each target device.
And comparing the device package names of the target devices in the initial printed circuit board diagram according to the device package names of the target devices, so as to obtain a second result of whether the target devices have corresponding devices with the same device package name in the initial printed circuit board diagram.
After the first result and the second result are obtained, if the first result is that the corresponding devices with the same device position numbers exist in the initial printed circuit board diagram of each target device, and the second result is that the corresponding devices with the same device packaging names exist in the initial printed circuit board diagram of each target device, determining that each target device has devices with the same device information in the initial printed circuit board diagram, and obtaining a comparison result.
And if the first result is that any target device does not have the corresponding device with the same device position number in the initial printed circuit board diagram, or the second result is that any target device does not have the corresponding device with the same device packaging name in the initial printed circuit board diagram, determining that the target device does not have the device with the same device information in the initial printed circuit board diagram, and obtaining a comparison result.
If it is determined that any target device does not have a corresponding device with the same device position number in the initial printed circuit board diagram, or any target device does not have a corresponding device with the same device package name in the initial printed circuit board diagram, prompt information of abnormality of the device in the PCB diagram can be output, for example, the device position number cannot be found in the PCB diagram, the package names of the device position numbers in the PCB diagram are inconsistent, and the like.
According to the application, when the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed generated based on the design schematic diagram is obtained, and at least one target device is determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the to-be-processed design drawing, when each target device is determined to have the devices with the same device information in the initial printed circuit board diagram, the relative position of each target device in the design schematic diagram is determined, and further, after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing is quickly adjusted according to the relative position of each target device, so that the condition that each device is searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
In one embodiment, when an engineer finishes designing a schematic under an engineering file and then imports the schematic into a PCB under the engineering file, the engineer gets a cluttered PCB of devices. The present application requires engineering to allow only one PCB pattern to be present. The user enters an interface of the schematic diagram, selects a device needing to transmit the layout, and then starts software to execute the operation. The software will first check whether the selected devices in the schematic diagram exist in the PCB diagram according to the device bit number and the device package name. After confirming that the devices exist in the PCB, the software records the relative positions and the device position numbers of the selected devices in the schematic diagram, then jumps to the PCB interface, and finds and selects the corresponding devices in the PCB according to the device position numbers of the devices. The software rearranges the selected devices in the PCB according to the relative positions in the schematic diagram, and hovers on the mouse of the user after the arrangement is finished. The user can place the devices at his own discretion in the PCB diagram to a convenient design location.
The application aims to solve the problem that the efficiency of an engineer for searching devices is too low, so as to meet the requirement that the engineer can quickly and accurately search the required devices in the PCB, thereby improving the efficiency of drawing the drawing.
Fig. 2 is a second flow chart of a method for synchronizing design drawings according to an embodiment of the present application, as shown in fig. 2, in an embodiment, the present application may create an engineering file including a blank schematic diagram and a blank PCB diagram.
Further, the user can draw the schematic diagram in the blank, and further the device of the schematic diagram can be led into the blank PCB after the schematic diagram is drawn.
Further, the user may select a device in the schematic diagram to initiate the software operation. At this time, the software can record the bit number and the package name of the selected device in the schematic diagram.
Further, if the corresponding bit number is not found in the PCB, stopping the software to continue to execute downwards and report errors, if the package name pair of the devices with the same bit number in the PCB is not up, stopping the software to continue to execute downwards and report errors, and if the software finds the device with the same corresponding bit number and package name in the PCB, recording the position and the relative position of the selected device in the schematic diagram.
Further, the software hovers the selected rearranged device on the left mouse button in the PCB according to the position number and the relative position of the schematic diagram, and clicks the position after the user selects the position, so that the PCB with the synchronous schematic diagram symbol positions is completed.
The design drawing synchronization device provided by the embodiment of the application is described below, and the design drawing synchronization device described below and the design drawing synchronization method described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a design drawing synchronization device according to an embodiment of the present application, as shown in fig. 3, where the design drawing synchronization device includes:
The device comprises an acquisition module 310, a processing module and a processing module, wherein the acquisition module 310 is used for acquiring a to-be-processed design drawing, the to-be-processed design drawing comprises a design schematic diagram and an initial printed circuit board diagram generated based on the design schematic diagram, and all devices in the initial printed circuit board diagram are randomly placed;
a first determining module 320, configured to determine at least one target device from the design schematic based on a device selection operation on the design schematic in the design drawing to be processed;
A second determining module 330, configured to determine a relative position of each target device in the design schematic;
and the adjusting module 340 is configured to adjust positions of corresponding devices of the initial printed circuit board diagram in the to-be-processed design drawing according to the corresponding relative positions of each target device, so as to obtain a target printed circuit board diagram.
According to the design drawing synchronization device provided by the embodiment of the application, after the to-be-processed design drawing comprising the design schematic diagram and the printed circuit board diagram with each device randomly placed generated based on the design schematic diagram is obtained, at least one target device is determined from the design schematic diagram according to the device selection operation of the design schematic diagram in the to-be-processed design drawing, and further after the relative position of each target device in the design schematic diagram is determined, the position of the corresponding device of the initial printed circuit board diagram in the to-be-processed design drawing can be quickly adjusted according to the relative position corresponding to each target device, so that the situation that each device needs to be searched and adjusted one by an engineer is avoided, the drawing adjustment time is effectively shortened, and the efficiency of the engineers in drawing the design drawing can be improved.
Based on any of the above embodiments, the second determining module 330 is specifically configured to, when determining the relative position of each target device in the design schematic, perform the following operations for each target device:
Determining first device coordinates and first device direction information of a current target device;
determining first size information of the design schematic;
And determining the relative position of the current target device in the design schematic diagram according to the first device coordinate, the first device direction information and the first size information.
Based on any of the above embodiments, the adjustment module 340 is specifically configured to, when adjusting the positions of the corresponding devices of the initial printed circuit board diagram in the to-be-processed design drawing according to the corresponding relative positions of each target device, respectively perform the following operations for each target device:
Determining second size information of an initial printed circuit board diagram in the to-be-processed design drawing;
Determining second device coordinates and second device direction information of a corresponding device of the current target device in the initial printed circuit board diagram according to the second size information and the relative position of the current target device in the design schematic diagram;
And based on the second device coordinates and the second device direction information, performing position adjustment on a device corresponding to the current target device in the initial printed circuit board diagram.
Based on any of the above embodiments, the obtaining module 310 is further configured to:
determining a first file storage path of an initial printed circuit board diagram and a second file storage path of a design schematic diagram in the to-be-processed design drawing;
Determining a first file name of an initial printed circuit board diagram and a second file name of a design schematic diagram in the to-be-processed design drawing;
And if the first file storage path is consistent with the second file storage path and the first file name and the second file name have the same file name prefix, executing the device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
Based on any of the above embodiments, the obtaining module 310 is further configured to:
determining the number of initial printed circuit board diagrams in the to-be-processed design drawing;
And if the number of the initial printed circuit board graphs is equal to the preset number threshold, executing the device selection operation based on the design schematic diagram in the to-be-processed design drawing, and determining at least one target device from the design schematic diagram.
Based on any of the above embodiments, the obtaining module 310 is further configured to:
aiming at each target device, device information comparison is carried out in the initial printed circuit board diagram to obtain a comparison result;
And if the comparison result shows that each target device has devices with the same device information in the initial printed circuit board diagram, executing the device selection operation based on the design schematic diagram in the design drawing to be processed, and determining at least one target device from the design schematic diagram.
Based on any of the above embodiments, the obtaining module 310 includes an alignment unit, where the alignment unit is configured to:
According to the device position number of each target device, device position number comparison is carried out in the initial printed circuit board diagram respectively, and a first result is obtained;
According to the device package name of each target device, device package name comparison is carried out in the initial printed circuit board diagram respectively, and a second result is obtained;
and generating a comparison result based on the first result and the second result.
Based on the same ideas that of the above embodiments, the design drawing synchronization device provided by the present application can implement the method of the above embodiments, and for convenience of explanation, only a portion related to the embodiment of the present application is shown in a schematic structural diagram of an embodiment of the device, and it will be understood by those skilled in the art that the illustrated structure does not limit the device, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include a processor (processor) 410, a communication interface (Communications Interface) 420, a memory (memory) 430, and a communication bus 440, where the processor 410, the communication interface 420, and the memory 430 perform communication with each other through the communication bus 440. The processor 410 may call logic instructions in the memory 430 to perform a method of obtaining a design drawing to be processed, the design drawing to be processed including a design schematic and an initial printed circuit board diagram generated based on the design schematic, wherein each device in the initial printed circuit board diagram is randomly placed;
Determining at least one target device from a design schematic in the design drawing to be processed based on device selection operation on the design schematic;
determining the relative position of each target device in the design schematic;
and respectively carrying out position adjustment on the corresponding device of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative position of each target device to obtain the target printed circuit board diagram.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the related art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In yet another aspect, embodiments of the present application further provide a non-transitory computer readable storage medium having stored thereon a computer program that when executed by a processor performs a method provided by the above embodiments, for example, comprising obtaining a design drawing to be processed, the design drawing to be processed comprising a design schematic and an initial printed circuit board diagram generated based on the design schematic, wherein each device in the initial printed circuit board diagram is randomly placed;
Determining at least one target device from a design schematic in the design drawing to be processed based on device selection operation on the design schematic;
determining the relative position of each target device in the design schematic;
and respectively carrying out position adjustment on the corresponding device of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative position of each target device to obtain the target printed circuit board diagram.
In yet another aspect, embodiments of the present application further provide a computer program product having a computer program stored thereon, which when executed by a processor, implements the method provided by the above embodiments, for example, comprising obtaining a design drawing to be processed, the design drawing to be processed comprising a design schematic and an initial printed circuit board drawing generated based on the design schematic, wherein each device in the initial printed circuit board drawing is randomly placed;
Determining at least one target device from a design schematic in the design drawing to be processed based on device selection operation on the design schematic;
determining the relative position of each target device in the design schematic;
and respectively carrying out position adjustment on the corresponding device of the initial printed circuit board diagram in the design drawing to be processed according to the corresponding relative position of each target device to obtain the target printed circuit board diagram.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that the above-mentioned embodiments are merely illustrative of the application, and not limiting. While the application has been described in detail with reference to the embodiments, those skilled in the art will appreciate that various combinations, modifications, or equivalent substitutions can be made to the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application, and it is intended to be covered by the scope of the claims of the present application.