Application of three-dimensional matrix transformation in electrical power conversion
Patent Information
- Application Number
- CN202211643299.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-12-20
AI Technical Summary
上述过程极易出错,且较为机械繁琐
[0025]与现有的技术相比,本发明的优点在于:利用计算机程序代替人工操作,极大地节省了人工成本,提高了电气专业的出图效率;相比于人工操作,具有更高的准确性,减少了人为操作中的漏转、错转、多转;利用提资转换规则配置表和配置模板驱动程序,降低了提资转换的门槛,用户不需要了解全部转换规则也能够得到正确的提资结果;便于提资规则的维护,当提资规则变化后,仅需更改配置文件即可实现整个程序的更新。
Smart Images

Figure CN115774891B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of architectural design technology, specifically relating to an application of three-dimensional matrix transformation in electrical data conversion. Background Technology
[0002] In the architectural design industry, the electrical engineering profession is responsible for providing power and control to the equipment of various disciplines (HVAC, water supply and drainage). Therefore, during the design process, it needs to receive equipment data from all disciplines. However, since different disciplines use different equipment drawing styles, when receiving equipment data, the electrical engineering profession needs to convert the original discipline's equipment drawings into the corresponding electrical engineering drawings on the drawings; this is known as data conversion.
[0003] During data conversion, electrical designers need to manually identify drawings from other disciplines within DWG files, locate the equipment requiring conversion, and insert the new electrical equipment in the appropriate location based on the conversion mode (high voltage or low voltage). They must also fill in information such as the equipment's load number, purpose, and power consumption. However, this process presents numerous problems and inconveniences. First, electrical designers need to understand the equipment blocks from other disciplines and their corresponding electrical equipment blocks, paying close attention during data conversion; otherwise, omissions, errors, or multiple conversions may occur. Second, when inserting new blocks, designers must insert them in their original positions with high precision, avoiding arbitrary insertion. After insertion, the scale, rotation angle, and attributes of the new block must be set according to the information from the original block. Some blocks also include annotations, the location and information of which also need to be set. Furthermore, architectural design is a process of continuous iteration and updating based on various needs. This necessitates that electrical designers verify numerous data changes during each round of revisions, comparing them with previous data submissions to determine which equipment has been modified and to update the data results accordingly. The above process is prone to errors and is rather mechanical and tedious. Summary of the Invention
[0004] The purpose of this invention is to address the above-mentioned problems by providing a reasonably designed application of three-dimensional matrix transformation in electrical data conversion that enables automatic conversion of equipment blocks in drawings.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: an application of three-dimensional matrix transformation in electrical signal conversion, comprising the following steps:
[0006] S1: Read the capital contribution rule configuration table;
[0007] S2: Drawing data extraction;
[0008] S3: Establish the mapping relationship between the source block and the target block;
[0009] S4: Insert a block and use matrix transformations to set the block properties.
[0010] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, step S1 splits each piece of information in the data conversion rule configuration table into source block information and target block information, storing them in two separate Dictionaries. Simultaneously, a ThBConvertRule class is defined to store the block information, resulting in a List containing all data conversion rules. <thbconvertrule>Rules.
[0011] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, step S2 extracts the source block names from the Rules and organizes them into a List. <string>srcNames, from a List <string>`srcNames` extracts source block data from the drawing.
[0012] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, step S2 prepares a drawing data extraction engine to read planar data from the drawing, then filters the external parameters according to the data source, judges all blocks and blocks within blocks, and finally extracts all blocks whose block names are contained in srcNames.
[0013] In the above-mentioned application of electrical data conversion based on three-dimensional matrix transformation, the source block data in step S2 includes the primitive Id corresponding to the block, the block name, the block position, the block scaling ratio, the block rotation angle, the block attributes, the block dynamic attributes, and the matrix transformation of the block relative to the world coordinate system. The data is encapsulated in ThBlockReferenceData to obtain all the block data that needs to be converted.
[0014] In the above-mentioned application of three-dimensional matrix transformation in electrical signal conversion, step S3 includes the following steps:
[0015] S31: Traverse the Rules and match the ThBConvertRule that contains the source block name and its current visibility to get the corresponding target block name;
[0016] S32: Import the corresponding target block and the layer containing the target block from the opened data submission template.
[0017] In the above-mentioned application of three-dimensional matrix transformation in electrical signal conversion, step S4 includes the following steps:
[0018] S41: Set the scaling transformation, mirror transformation, and rotation transformation of the target block in sequence;
[0019] S42: Calculate the base points for different map blocks based on their types;
[0020] S43: Set the translation transformation of the target block based on the position base point;
[0021] S44: Assign values to the attributes of the target block.
[0022] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, in step S41, the scaling transformation inserts the target block at the origin position, sets the insertion position base point and insertion ratio, and keeps the rotation angle at 0 degrees to achieve the scaling transformation.
[0023] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, in step S41, the mirror transformation uses the Matrix3d.Mirroring() method to construct mirror matrices under different conditions, and performs a mirror transformation on the target block to obtain a target block with the same mirror condition as the source block.
[0024] In the above-mentioned application of three-dimensional matrix transformation in electrical data conversion, step S41 uses the angle attribute of the source block and whether the source block is a right-handed coordinate system primitive to know the rotation angle of the target block, obtains the rotation transformation matrix of the target block, and performs a rotation transformation on the mirror image of the target block.
[0025] Compared with existing technologies, the advantages of this invention are as follows: It utilizes computer programs to replace manual operations, greatly saving labor costs and improving the drawing efficiency of electrical engineering; it offers higher accuracy compared to manual operations, reducing omissions, errors, and over-conversions that occur during manual operations; it lowers the barrier to entry for data conversion by using a data conversion rule configuration table and configuration template driver, allowing users to obtain correct data conversion results without needing to understand all conversion rules; and it facilitates the maintenance of data conversion rules, as changes to the rules only require modifying the configuration file to update the entire program. Attached Figure Description
[0026] Figure 1 This is a schematic diagram illustrating the application principle of the present invention;
[0027] Figure 2 This is a schematic diagram of the user interface of the present invention;
[0028] Figure 3 This is a schematic diagram of the capital contribution rule configuration table of the present invention. Detailed Implementation
[0029] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0030] like Figure 1-3 As shown, an application of three-dimensional matrix transformation in electrical signal conversion is described. The hardware environment for its development is an Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz and 8.0GB RAM. The hardware environment for its operation is an Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz and 3.19GHz and 8.0GB RAM. The application runs on Windows 10 and was developed using Visual Studio with C# and WPF, with CAD as the supporting environment. The specific steps involved in its operation are as follows:
[0031] S1: Read the capital contribution rule configuration table;
[0032] S2: Drawing data extraction;
[0033] S3: Establish the mapping relationship between the source block and the target block;
[0034] S4: Insert blocks and set block attributes using matrix transformation. Users need to select parameters such as the data extraction discipline (HVAC, Plumbing) and conversion mode (high-voltage, low-voltage) on the operation UI for the program to run. During the data extraction process, in most cases, the combination of block name and current visibility represents a specific type of equipment block. Therefore, to identify equipment blocks in external parameter data, this technology uses "block name + current visibility" as the unique identifier for equipment blocks. Based on this, this configuration table constructs a block mapping for equipment in different disciplines. The electrical blocks to be extracted can be identified based on the source block. Additionally, the center point of the block can be determined by reading the configuration table. By calculating the center points of the source block (i.e., blocks from other disciplines in the external parameters) and the target block (i.e., the electrical extraction result block), and then transforming the target block so that its center point coincides with the source block, the extracted electrical block can be obtained in its original position.
[0035] Specifically, the resource provisioning rule configuration table provides all resource provisioning information and is the foundation of this application's files. To obtain this information, the configuration table must first be read and its information converted into easily usable classes. Step S1 involves splitting each entry in the resource provisioning rule configuration table into source block information and target block information, storing them in two separate Dictionaries. Simultaneously, a ThBConvertRule class is defined to store the block information, resulting in a List containing all resource provisioning rules. <thbconvertrule>Rules.
[0036] In more detail, step S2 extracts the source block names from the Rules and organizes them into a List. <string>srcNames, from a List <string>The `srcNames` function extracts source block data from the drawings. Simultaneously, a drawing data extraction engine, ThBConvertElementExtraction-Engine, reads planar data from the drawings, filters it based on the source discipline (HVAC, plumbing), and performs checks on all blocks and block-within-a-block references. Finally, it extracts all blocks whose names are contained in `srcNames`, and records all subsequent data needed from the source blocks.
[0037] Furthermore, the source block data in step S2 includes the primitive ID (ObjectId ObjId) corresponding to the block, the block name (string EffectiveName), the block position (Point3d Position), the block scaling factor (Scale3dScaleFactors), the block rotation angle (double Rotation), and the block attributes (SortedDictionary).<string,string> The data includes attributes, dynamic properties of the tiles (DynamicBlockReferencePropertyCollection CustomProperties), and matrix transformations of the tiles relative to the world coordinate system (Matrix3dOwnerSpace2WCS). This data is encapsulated in ThBlockReferenceData, yielding a list of all the tile data required for data extraction. <thblockreferencedata>Results).
[0038] In addition, after extracting all the data-generating tiles, it is necessary to begin data extraction processing for each tile. First, a mapping relationship between the source tile and the target tile needs to be established. Step S3 includes the following steps:
[0039] S31: Traverse the Rules and match the ThBConvertRule that contains the source block name and its current visibility to get the corresponding target block name;
[0040] S32: Import the corresponding target block and its layer from the opened data template. With the preliminary work complete, the insertion operation can then be performed.
[0041] Before inserting a block, it's necessary to understand the principle of inserting a block using matrix transformations. This application aims to insert a target block at the location of the source block with the same external parameters, maintaining the same flip state, rotation angle, attributes, and dynamic attributes. OwnerSpace2WCS records all transformations of the source block to its current location, including scaling, mirroring, rotation, and translation. By decomposing OwnerSpace2WCS into matrices, we obtain four corresponding matrices: S, M, R, and T. Then, we perform four transformations on the target block: S' (user-defined), M, R, and T (note that the order should not be changed), resulting in a refined target block at its original location. Step S4 includes the following steps:
[0042] S41: Set the scaling transformation, mirror transformation, and rotation transformation of the target block in sequence;
[0043] S42: Calculate the base points for different map blocks based on their types;
[0044] S43: Set the translation transformation of the target block based on the position base point;
[0045] S44: Assign values to the attributes of the target block.
[0046] As can be seen, in step S41, the scaling transformation inserts the target block at the origin position, sets the layer to "0", sets the insertion position base point Point3d.Origin, the insertion scale (set by the user in the UI), and keeps the rotation angle at 0 degrees to achieve the scaling transformation, thus realizing the scaling transformation during the insertion process.
[0047] Clearly, the scaling of the source block in the X, Y, and Z directions can be determined through the ScaleFactors in the source block. When calculating the mirror transformation matrix, only the signs of the scaling matrix in the three directions need to be considered. Therefore, in step S41, the mirror transformation uses the Matrix3d.Mirroring() method to construct mirror matrices for different conditions, and performs a mirror transformation on the target block to obtain a target block with the same mirror condition as the source block.
[0048] Preferably, step S41 uses the angle attribute of the source block and whether the source block is a right-handed coordinate system primitive to know the rotation angle of the target block, obtains the rotation transformation matrix of the target block, and performs a rotation transformation on the mirror image of the target block.
[0049] When performing translation transformations, since different blocks have different calculation base points, it is necessary to obtain the calculation base points of different blocks according to the configuration table. With the help of Rules, the base point calculation mode (BasePoint, OBBCenter, BottomCenter, CircleCenter, TextCenter, AxialFlowFan, EquipmentBase) of the corresponding source and target blocks can be determined.
[0050] BasePoint: Returns the base point of the tile position.
[0051] OBBCenter: After exploring a tile, it returns the bounding box of all elements under the specified layer.
[0052] BottomCenter: After exploring the tile, returns the midpoint of the line closest to the base point.
[0053] CircleCenter: After exploring a tile, returns the center point of the unique circle within it.
[0054] TextCenter: After exploring the tile, returns the bounding box of all DBText elements under the specified layer.
[0055] AxialFlowFan: Calculates the location of the axial flow fan based on the fan angle, fan length, and fan equipment base point.
[0056] EquipmentBase: Calculates the location of the fan based on the fan base point and the fan equipment base point.
[0057] After calculating the base points of the blocks, an OwnerSpace2WCS transformation is performed on the base points of both the source and target blocks to obtain the block positions srcBlockDataPosition and targetBlockDataPosition under WCS. The difference between the two represents the offset of the position vector between the source block and the newly inserted block. Finally, a translation transformation with an offset of offset is performed on the target block to obtain the data-providing block at its original position.
[0058] Finally, assign values to the target block's attributes to ensure data consistency between the source and target blocks. At this point, special attention should be paid to "load annotation" type blocks; in addition to attribute assignment, the annotation position also needs to be adjusted according to the source block. After setting up the target block layer, the data conversion process is complete.
[0059] Building upon the existing data conversion process, the aforementioned technologies are applied to data comparison. Architectural design is a continuous process of iterative updates based on various needs. This necessitates that electrical engineers verify numerous data changes during each round of revisions, comparing them with previous data submissions to determine which equipment has been modified in the current iteration. This creates a need to extend the capabilities beyond data conversion to enable data comparison.
[0060] The purpose of the capital contribution comparison is to compare the results of two capital contribution attempts, compare the differences between them, and present them to the user. At the same time, the user can also manually view the data differences and selectively make partial capital contribution updates.
[0061] The implementation details are as follows: Since the drawing already contains the previous data extraction results, the block extraction engine mentioned above needs to be used to extract the existing data extraction results from the current drawing before extracting the data. Then, based on the data extraction conversion technology, the data extraction results for the current drawing can be obtained. Comparing the two results will yield the following possible outcomes:
[0062] A. The position of a certain device is the same as in the previous version, indicating that the device has not changed between the two drawings;
[0063] B. If a device only exists in the previous version of the results, it means that the device has been deleted from the current external parameter drawing. In this case, the device will be outlined with a cloud circle of color ① (deleted).
[0064] C. The device only exists in this result, indicating that the device has been added to the external parameter drawing. In this case, the device (new) will be outlined using a cloud circle of color ②.
[0065] D. Based on the unique identifier of the equipment, such as the load number, determine whether the position of the same equipment has shifted, and use the cloud line of color ③ to circle the original position and the updated position of the equipment respectively.
[0066] This categorizes all device updates into four types, presenting these results in the UI. Users double-click to record, and the tool instantly zooms to the specified block location on the drawing. A 500-position tolerance exists when determining if two blocks are at the same location; blocks with the same name and a tolerance within 500 are considered the same block.
[0067] In summary, the principle of this embodiment is as follows: by reading the configuration table to know the center base point position of the block, by calculating the center base points of the source block and the target block respectively, and then transforming the target block so that the center base points of the target block and the source block coincide, the improved electrical block can be obtained in the original position.
[0068] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
[0069] Although this document uses terms such as asset conversion frequently, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of this invention; interpreting them as any additional limitation would contradict the spirit of this invention.< / thblockreferencedata> < / string> < / string> < / thbconvertrule> < / string> < / string> < / thbconvertrule>
Claims
1. An application of three-dimensional matrix transformation in electrical signal conversion, characterized in that, Includes the following steps: S1: Read the funding rule configuration table, split each piece of information in the table into source block information and target block information, and store them in two Dictionaries respectively. At the same time, define a ThBConvertRule class to store the block information, resulting in a List containing all funding rules. <thbconvertrule> Rules;< / thbconvertrule> S2: Drawing data extraction; S3: Establish the mapping relationship between the source block and the target block; S4: Insert a block and set its properties using matrix transformations; S41: Set the scaling transformation, mirror transformation, and rotation transformation of the target block in sequence; S42: Calculate the base points for different map blocks based on their types; S43: Set the translation transformation of the target block based on the location base point; obtain the calculation base points of different blocks according to the configuration table, and use the Rules to know the base point calculation mode of the corresponding source block and target block, as follows: BasePoint: Returns the base point of the tile's position; OBBCenter: After the tile is explored, it returns the points in the outer bounding box of all elements under the specified layer; BottomCenter: After exploring a tile, it returns the midpoint of the line closest to the base point. CircleCenter: After exploring a tile, returns the center point of the only circle within it; TextCenter: After the tile is explored, it returns all points in the outer bounding box of all DBTexts under the specified layer; AxialFlowFan: Calculates the location of the axial flow fan based on the fan angle, fan length, and fan equipment base point; EquipmentBase: Calculates the location of the fan based on the fan base point and the fan equipment base point; After calculating the base point of the map block, the base points of the source block and the target block are transformed by OwnerSpace2WCS to obtain the positions of the map blocks under WCS, srcBlockDataPosition and targetBlockDataPosition. The difference between the two represents the position vector difference offset between the source block and the newly inserted map block. The target block is then transformed by a translation with an offset of offset to obtain the data-providing map block at its original position. S44: Assign values to the attributes of the target block.
2. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 1, characterized in that, Step S2 extracts the source block names from the Rules and organizes them into a List. <string>srcNames, from a List <string> `srcNames` extracts source block data from the drawing.< / string> < / string> 3. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 2, characterized in that, Step S2 prepares a drawing data extraction engine to read planar data from the drawing, then filters the external parameters according to the source of the data, judges all blocks and blocks within blocks, and finally extracts all blocks whose names are contained in srcNames.
4. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 3, characterized in that, The source block data in step S2 includes the primitive Id corresponding to the block, the block name, the block position, the block scaling ratio, the block rotation angle, the block attributes, the block dynamic attributes, and the matrix transformation of the block relative to the world coordinate system. The data is encapsulated in ThBlockReferenceData to obtain all the block data that needs to be extracted.
5. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 1, characterized in that, Step S3 includes the following steps: S31: Traverse the Rules and match the ThBConvertRule that contains the source block name and its current visibility to get the corresponding target block name; S32: Import the corresponding target block and the layer containing the target block from the opened data submission template.
6. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 1, characterized in that, In step S41, the scaling transformation involves inserting the target block at the origin position, setting the insertion base point and insertion ratio, and maintaining the rotation angle at 0 degrees to achieve the scaling transformation.
7. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 1, characterized in that, In step S41, the mirror transformation uses the Matrix3d.Mirroring() method to construct mirror matrices for different situations, and performs a mirror transformation on the target block to obtain a target block with the same mirror situation as the source block.
8. The application of three-dimensional matrix transformation in electrical signal conversion according to claim 1, characterized in that, Step S41 uses the angle attribute of the source block and whether the source block is a right-handed coordinate system primitive to know the rotation angle of the target block, obtains the rotation transformation matrix of the target block, and performs a rotation transformation on the mirror image of the target block.
Citation Information
Patent Citations
Electromechanical drawing drawing method and system based on capital drawing
CN115422628A