Disclosure of Invention
In view of the above, it is necessary to provide a method and an apparatus for adjusting the accuracy of the component dimensions in the building design software, which can automatically adjust the accuracy of the model.
A method of accuracy adjustment of component dimensions in architectural design software, the method comprising:
acquiring the size of a component in the building design software;
and when the size has the broken number, carrying out rounding operation on the size of the component to obtain the adjusted size of the component.
In one embodiment, the obtaining the dimensions of the components in the architectural design software includes: acquiring a starting coordinate and an ending coordinate of a component in building design software; and calculating the size of the component according to the initial coordinate and the final coordinate.
In one embodiment, the number of fragments present in the size of the member is determined when the number of fragments present in the size of the member.
In one embodiment, the rounding the dimensions of the component comprises: rounding the number behind the decimal point of the dimension to obtain the dimension of the adjusted component; or zeroing the number behind the decimal point of the dimension to obtain the dimension of the adjusted component.
In one embodiment, the size of the member is determined to have a number of pieces when the size of the member is not divisible by a minimum modulus.
In one embodiment, the rounding the dimensions of the component comprises:
calculating the remainder of the size of the component divided by the minimum modulus, and dividing the remainder by the minimum modulus to obtain a quotient;
when the quotient is greater than or equal to a preset value, subtracting the sum of the difference value of the remainder and the minimum modulus from the size of the component to obtain an adjusted size of the component;
and when the quotient is smaller than a preset value, subtracting the remainder from the size of the component to obtain the adjusted size of the component.
In one embodiment, the preset value is 0.4, 0.5 or 0.6.
An accuracy adjustment device for a component size in architectural design software, the device comprising:
the dimension acquisition module is used for acquiring the dimension of a component in the building design software;
and the rounding module is used for rounding the size of the component when the number of fragments exists in the size, so as to obtain the adjusted size of the component.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring the size of a component in the building design software;
and when the size has the broken number, carrying out rounding operation on the size of the component to obtain the adjusted size of the component.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring the size of a component in the building design software;
and when the size has the broken number, carrying out rounding operation on the size of the component to obtain the adjusted size of the component.
According to the method and the device for adjusting the accuracy of the component size in the building design software, the accuracy of the built model can be ensured when modeling is performed according to the base diagram in reverse design by judging the number of fragments of the component size in the building design software and performing rounding operation on the component size with the number of fragments.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, there is provided a method for adjusting the accuracy of the dimensions of components in a building design software, comprising the steps of:
s110, obtaining the sizes of components in the building design software.
Wherein the building design software may be fabricated building design software. When a user uses the building design software, drawing a base map in advance, modeling through the base map, wherein a component is the minimum unit for forming the base map; or the bottom graph is just drawn, and the size of the component in the just drawn bottom graph is obtained. The dimensions in the embodiments of the present application include a length value, a width value, or a thickness value.
And S120, when the size has the broken number, carrying out rounding operation on the size of the member to obtain the adjusted size of the member.
In the process of drawing the building base map, due to operation problems, errors occur in the actual length of the components in the building design software, for example, the theoretical value of the length of the edge components is 500mm, but the actual length drawn on the drawing is 500.1mm, or the actual lengths drawn on the drawing are 501mm and 502mm, so that the size of the components can be judged to have broken numbers.
The dimension of the component is rounded to ensure the accuracy of the building base map in modeling, if the base map is directly modeled due to errors, the actual length of the component is broken, and the later factory production is affected.
In one embodiment, the obtaining the dimensions of the components in the architectural design software includes: acquiring a starting coordinate and an ending coordinate of a component in building design software; and calculating the size of the component according to the initial coordinate and the final coordinate. Wherein, the start point and the stop point of the component all have corresponding coordinate values.
In one embodiment, the obtaining the dimensions of the components in the architectural design software includes: the dimensions of the components in the building design software are retrieved from memory. Wherein the dimensions of the components may be pre-stored in a memory.
In the method for adjusting the accuracy of the component size in the building design software, the accuracy of the built model can be ensured when modeling is performed according to the base map in reverse design by judging the number of fragments of the component size in the building design software and performing rounding operation on the component size with the number of fragments.
In one embodiment, the presence of the number of fragments in the size of the member is determined when the number of fragments in the size of the member is present.
In one embodiment, the rounding the dimensions of the component comprises: rounding the number behind the decimal point of the dimension to obtain the dimension of the adjusted component; or zeroing the number behind the decimal point of the dimension to obtain the dimension of the adjusted component.
For example, the size of the member is 1000.1mm or 999.9mm, and the adjusted size of the member may be 1000mm according to the rounding method. For another example, the size of the member is 1000.1mm or 1000.2mm, and the size of the member after adjustment by the zeroing method is 1000mm.
In one embodiment, the number of breaks in the size of the member is determined when the size of the member is not divisible by a minimum modulus.
In one embodiment, as shown in fig. 2, the rounding the size of the member includes:
s210, calculating the remainder of the size of the component divided by the minimum modulus, and dividing the remainder by the minimum modulus to obtain a quotient.
And S220, when the quotient is greater than or equal to a preset value, subtracting the sum of the difference value of the remainder and the minimum modulus from the size of the component to obtain the adjusted size of the component.
And S230, subtracting the remainder from the size of the component when the quotient is smaller than a preset value, so as to obtain the adjusted size of the component.
Wherein the preset value is 0.4, 0.5 or 0.6, and specifically 0.5 is taken.
For example, the size of the component is 1001mm or 1002mm, the minimum modulus of the building is 50mm, and the remainder is 1 or 2, and the division of 1 or 2 by 50 is less than 0.5, so that the remainder is 1000 by subtracting the size of the component, and the size of the component after adjustment is 1000mm; for another example, where the size of the member is 1048mm or 1049mm and the minimum modulus of the building is 50mm, the remainder is 48 or 49, respectively, where 48 or 49 divided by 50 is greater than 0.5, and therefore the size of the member minus the remainder plus the minimum modulus is 1050 and the adjusted size of the member is 1050mm. In the examples mm represents the unit: millimeter.
It should be understood that, although the steps in the flowcharts of fig. 1-2 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-2 may include multiple sub-steps or phases that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or phases are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or phases of other steps or other steps.
In one embodiment, as shown in fig. 3, there is provided an accuracy adjustment device for a component size in a building design software, including: a size acquisition module 310 and a rounding module 320, wherein:
the dimension acquisition module 310 is configured to acquire a dimension of a component in the architectural design software.
Wherein the building design software may be fabricated building design software. When a user uses the building design software, drawing a base map in advance, modeling through the base map, wherein a component is the minimum unit for forming the base map; or the bottom graph is just drawn, and the sizes of the components in the just drawn building design software are obtained.
And the rounding module 320 is configured to perform a rounding operation on the size of the component when the number of fragments exists in the size, so as to obtain an adjusted size of the component.
In the process of drawing the building base map, due to operation problems, errors occur in the actual length of the components in the building design software, for example, the theoretical value of the length of the edge components is 500mm, but the actual length drawn on the drawing is 500.1mm, or the actual lengths drawn on the drawing are 501mm and 502mm, so that the size of the components can be judged to have broken numbers.
The dimension of the component is rounded to ensure the accuracy of the building base map in modeling, if the base map is directly modeled due to errors, the actual length of the component is broken, and the later factory production is affected.
In one embodiment, as shown in fig. 4, the size acquisition module 310 includes: a coordinate acquisition unit 311 for acquiring a start coordinate and an end coordinate of a component in the architectural design software; a size calculation unit 312 for calculating the size of the member based on the start and end coordinates.
In one embodiment, the dimension acquisition module 310 includes retrieving the dimensions of the components in the architectural design software from memory. Wherein the dimensions of the components may be pre-stored in a memory.
In one embodiment, the presence of the number of fragments in the size of the member is determined when the number of fragments in the size of the member is present.
The rounding the dimensions of the component comprises: rounding the number behind the decimal point of the dimension to obtain the dimension of the adjusted component; or zeroing the number behind the decimal point of the dimension to obtain the dimension of the adjusted component.
In one embodiment, the number of breaks in the size of the member is determined when the size of the member is not divisible by the minimum modulus.
As shown in fig. 5, the rounding module 330 includes: a quotient calculation unit 331 for calculating a remainder of the size of the member divided by the minimum modulus, and dividing the remainder by the minimum modulus, to obtain a quotient; and an adjusting unit 332, configured to, when the quotient is greater than or equal to a preset value, subtract the sum of the minimum modulus and the difference of the remainder from the size of the component, and when the quotient is less than the preset value, subtract the remainder from the size of the component, so as to obtain the adjusted size of the component.
Wherein the preset value is 0.4, 0.5 or 0.6, and specifically 0.5 is taken.
For a specific limitation of the accuracy adjustment device for the component size in the building design software, reference may be made to the limitation of the accuracy adjustment method for the component size in the building design software hereinabove, and the description thereof will not be repeated. The above-described means for adjusting the accuracy of the dimensions of the components in the building design software may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing start-stop coordinate data of the component. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method for adjusting the accuracy of the dimensions of a component in a building design software.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring the size of a component in the building design software;
and when the size has the broken number, carrying out rounding operation on the size of the component to obtain the adjusted size of the component.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring the size of a component in the building design software;
and when the size has the broken number, carrying out rounding operation on the size of the component to obtain the adjusted size of the component.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.