Electrical structure generation and cross-platform interaction system independent of CAD platform
The electrical structure generation and cross-platform interaction system, based on a three-layer decoupled architecture, solves the platform binding problem of electrical design tools, achieves cross-platform compatibility and efficient development and maintenance, adapts to multiple CAD platforms and web-based design tools, and improves design efficiency and user experience.
Patent Information
- Application Number
- CN202511996301.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing electrical structure design tools are highly dependent on specific CAD platforms, resulting in poor compatibility, low development and maintenance efficiency, and insufficient scalability, making it impossible to quickly adapt to emerging platforms.
A three-layer decoupled architecture is adopted, including a core generation layer, a general intermediate data layer, and an adapter presentation layer, to decouple electrical business logic from graphics drivers. Through the standardized encapsulation of the general intermediate data layer and the multi-platform driver module of the adapter presentation layer, it can be adapted to different CAD platforms.
It achieves strong cross-platform compatibility, high development and maintenance efficiency, and excellent scalability. It can flexibly adapt to a variety of mainstream CAD platforms and web-based design tools, reducing enterprise costs and improving design efficiency and user experience.
Smart Images

Figure CN121858078A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical structure design technology, and in particular to an electrical structure generation and cross-platform interaction system independent of CAD platform. Background Technology
[0002] In the field of electrical engineering design, the design of electrical structures (such as cable trays, busbar trunking, and electrical cabinet frames) relies heavily on CAD platforms. Currently, the mainstream CAD platforms on the market include SolidWorks, AutoCAD, Revit, and ZWCAD, each with its own kernel architecture, API interfaces, and graphics rendering mechanisms.
[0003] Existing electrical structure design tools generally suffer from "platform binding": most design tools are custom-developed for specific CAD platforms, and their electrical business logic operations (such as current carrying capacity calculation, safety clearance verification, topology path planning, etc.) are deeply coupled with the platform's graphics-driven modules. This coupled architecture leads to the following drawbacks: First, poor compatibility: design tools developed for a specific CAD platform cannot be directly migrated to other platforms. If users change CAD platforms, they need to repurchase or develop adaptable tools, increasing enterprise costs. Second, low development and maintenance efficiency: technical personnel need to repeatedly implement core electrical business logic for different platforms, and subsequent iterations and upgrades require simultaneous modifications to versions on multiple platforms, resulting in a large workload. Third, insufficient scalability: when new CAD platforms emerge (such as emerging WebGL web-based design tools), existing tools are difficult to adapt quickly and cannot meet the industry's technological development needs.
[0004] To address the aforementioned issues, there is an urgent need for a technical solution that can break free from the constraints of specific CAD platforms and decouple electrical business logic from graphics-driven processes, thereby improving the cross-platform compatibility, development efficiency, and scalability of electrical structure design tools. Summary of the Invention
[0005] In view of this, the embodiments of this application provide an electrical structure generation and cross-platform interaction system independent of the CAD platform. Through a three-layer decoupling architecture, the electrical business logic operation and the graphics platform drive are separated, thereby achieving a universal electrical structure generation and interaction function across CAD platforms.
[0006] The technical solution of this application embodiment is implemented as follows: In a first aspect, embodiments of this application provide an electrical structure generation and cross-platform interaction system independent of a CAD platform, including a core generation layer, a general intermediate data layer, and an adapter presentation layer. These layers collaborate through data interaction to achieve decoupling between electrical business logic operations and graphics platform-driven operations; wherein: The core generation layer, whose output is connected to the input of the general intermediate data layer, is used to independently perform mathematical and physical calculations related to electrical structures. It does not depend on the kernel and library files of the CAD platform and its operation is independent of the graphical user interface rendering thread. It transmits the raw data obtained from the calculation to the general intermediate data layer. The general intermediate data layer, whose output is connected to the input of the adapter presentation layer, is used to define a general electrical structure description protocol and to standardize and encapsulate the raw data transmitted by the core generation layer. The data includes the topological characteristics and physical attribute information of electrical components. The adapter presentation layer, with its feedback end connected to the input end of the core generation layer, includes at least one driver module adapted to different CAD platforms. This module converts the standardized data transmitted by the general intermediate data layer into graphic instructions recognizable by the corresponding CAD platform to complete the graphic generation of the electrical structure. Simultaneously, it can reverse-parse the geometric operations within the CAD platform into standardized data and transmit them back to the core generation layer through the feedback end.
[0007] Secondly, embodiments of this application also provide a method for generating electrical structures and cross-platform interaction independent of a CAD platform, characterized in that, when applied to the system described in any one of claims 1-7, it includes the following steps: The core generation layer performs mathematical and physical calculations for current calculation, safety verification, and topology path planning based on the input electrical structure requirement parameters to obtain the raw data of the electrical structure. The general intermediate data layer uses a general electrical architecture description protocol to standardize and encapsulate the raw data, generating standardized data. The adapter presentation layer converts the standardized data into graphic generation instructions for the corresponding CAD platform through the corresponding CAD platform's driver module, thereby driving the CAD platform to generate and display the electrical structure graphics. When operating on electrical structure graphics or modifying core generation layer parameters within the CAD platform, the electrical structure generation and display steps are repeated, or the operations within the CAD platform are reverse-analyzed into standardized data and sent back to the core generation layer for logical verification through the adapter presentation layer, forming a data closed loop.
[0008] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the electrical structure generation and cross-platform interaction method independent of the CAD platform as described in any of the second aspects.
[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the electrical structure generation and cross-platform interaction method independent of any one of the second aspects.
[0010] The embodiments of this application have the following beneficial effects: (1) Strong cross-platform compatibility: The three-layer decoupling architecture completely separates the electrical business logic from the CAD platform. With the help of the standardized encapsulation of the general intermediate data layer and the multi-platform driver module of the adapter presentation layer, it can be adapted to a variety of mainstream CAD platforms and Web-based design tools, solving the platform binding problem of existing tools. When enterprises change CAD platforms, they do not need to repurchase or develop tools, which greatly reduces the cost of use.
[0011] (2) High development and maintenance efficiency: The core electrical business logic only needs to be developed once, and can be adapted to multiple CAD platforms through different adapters, avoiding repeated development; during subsequent iterations and upgrades, only the core generation layer or the adapter module of the corresponding platform needs to be modified, without the need to modify the entire platform version synchronously, which significantly reduces the workload of development and maintenance.
[0012] (3) Optimization of interaction efficiency: Incremental updates of graphics are achieved by calculating difference data through virtual geometric models, avoiding the regeneration of the entire model and improving the speed of graphic updates; at the same time, the data closed-loop design ensures the consistency between CAD platform operation and core business logic, reduces the risk of illegal design, and improves the user design experience.
[0013] (4) Excellent scalability: When a new CAD platform emerges, only the corresponding adapter driver module needs to be developed. The system can be quickly connected without changing the core architecture of the system, which can flexibly meet the needs of industry technology development and extend the system life cycle. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is an architecture diagram of an electrical structure generation and cross-platform interaction system independent of the CAD platform provided in the embodiments of this application; Figure 2 This is a flowchart illustrating steps S201-S204 provided in the embodiments of this application; Figure 3This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0017] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0018] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0020] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application and is not intended to limit this application.
[0022] See Figure 1 , Figure 1 This is an architecture diagram of an electrical structure generation and cross-platform interaction system independent of the CAD platform provided in the embodiments of this application, such as... Figure 1 As shown, it includes a core generation layer, a general intermediate data layer, and an adapter presentation layer. These layers collaborate through data interaction to decouple electrical business logic operations from the graphics platform driver; among which: The core generation layer, whose output is connected to the input of the general intermediate data layer, is used to independently perform mathematical and physical calculations related to electrical structures. It does not depend on the kernel and library files of the CAD platform and its operation is independent of the graphical user interface rendering thread. It transmits the raw data obtained from the calculation to the general intermediate data layer. The general intermediate data layer, whose output is connected to the input of the adapter presentation layer, is used to define a general electrical structure description protocol and to standardize and encapsulate the raw data transmitted by the core generation layer. The data includes the topological characteristics and physical attribute information of electrical components. The adapter presentation layer, with its feedback end connected to the input end of the core generation layer, includes at least one driver module adapted to different CAD platforms. This module converts the standardized data transmitted by the general intermediate data layer into graphic instructions recognizable by the corresponding CAD platform to complete the graphic generation of the electrical structure. Simultaneously, it can reverse-parse the geometric operations within the CAD platform into standardized data and transmit them back to the core generation layer through the feedback end.
[0023] This application constructs a three-layer decoupled architecture consisting of a "core generation layer - general intermediate data layer - adapter presentation layer." Through clearly defined inter-layer data interaction links, it achieves a complete separation between electrical business logic operations and graphics platform-driven operations, overcoming the core architectural flaw of deep integration between electrical design tools and CAD platforms in existing technologies. This "decoupling" is not simply a functional split, but rather means that the implementation of electrical business logic (such as current carrying capacity calculation and safety compliance verification) is completely independent of any CAD platform's proprietary resources. Graphics generation and interaction also do not need to intervene in the core business logic calculation process. The two collaborate through standardized data interaction, laying a core foundation for cross-platform compatibility.
[0024] The core generation layer establishes a unidirectional data transmission connection between its output and the input of the general intermediate data layer, ensuring that the calculated raw data is accurately transmitted to the intermediate layer. Simultaneously, the core generation layer's input establishes a reverse data connection with the feedback of the adapter presentation layer, forming a closed data loop of "forward generation - reverse verification." The key to the core generation layer lies in its "platform independence," specifically manifested in two aspects: First, it does not rely on any CAD platform's kernel files or library files, such as not calling platform-specific libraries like SolidWorks' SldWorks.dll or AutoCAD's acdb19.dll, thus avoiding the impact of platform version updates on the core calculation logic. Second, its operation is independent of the graphical user interface rendering thread, completely eliminating the graphics rendering module's occupation of computational resources, ensuring the high efficiency and stability of core calculations. This design effectively avoids the problem of "computational interference caused by the coupling of business logic and graphics driver modules" in existing technologies.
[0025] The core function of the general intermediate data layer is to break down data language barriers between different layers and platforms. The raw data output by the core generation layer may be fragmented calculation results (such as individual current values or path coordinates), which cannot be directly recognized by different CAD platforms. Therefore, this layer encapsulates these unstructured raw data into standardized data in a unified format by defining a general electrical structure description protocol. The adapter presentation layer serves as the interaction bridge between the system and the CAD platform. Its driver modules correspond to different CAD platforms and are responsible for converting standardized data into platform-recognizable graphical instructions (such as SolidWorks feature creation instructions and AutoCAD drawing instructions). At the same time, it can capture the user's geometric operations within the CAD platform (such as dragging to adjust line segment lengths and modifying bending angles) and reverse-parse these operations into standardized data conforming to the general protocol, which is then sent back to the core generation layer. The three layers work together through a forward link of "core calculation - data standardization - graphics driving" and a reverse link of "operation parsing - data return - logic verification" to achieve the goal of "complete decoupling of business logic and graphics platform," ensuring that the system can flexibly adapt to different CAD platforms.
[0026] In some embodiments, the general electrical structure description protocol adopts a lightweight markup language format, and the topology ontology features are described by an ordered linked list of path units and feature units. The path units include segment units and bend units, and the feature units include processing feature-related parameters.
[0027] In the prior art, the data formats of different CAD platforms are very different (such as the .prt format of SolidWorks and the .dwg format of AutoCAD), which requires additional format conversion for cross-platform data transmission and has extremely poor compatibility. The embodiments of this application solve this problem from the source by using a unified protocol.
[0028] Specifically, the protocol adopts a lightweight markup language format. The core consideration for choosing "lightweight" is that frequent data interactions are required during the electrical structure design process (such as incremental updates after parameter modifications and data transmission during cross-platform switching). Lightweight formats (such as JSON, XML, YAML, Protobuf, or custom binary formats) have the advantages of fast parsing speed and low network / storage resource consumption, which can adapt to high-frequency data interaction scenarios and avoid interaction delays caused by data redundancy. At the same time, the protocol explicitly stipulates that the data must include "the topological ontological characteristics and physical attribute information of electrical components": the topological ontological characteristics determine the spatial form of the electrical structure. It is described by "ordered path units and feature unit linked lists" because the generation of electrical structures has a temporal sequence (such as drawing straight lines before bending, forming the body before punching). The ordered linked lists can accurately reproduce this design process. Among them, path units are used to define the basic extension trajectory of the electrical structure (such as straight lines and bending sections of cable trays), and feature units are used to define processing details (such as punching and chamfering). The combination of the two can completely describe the geometric form of the electrical structure. Physical property information (such as material, thickness, and current carrying capacity) is key to the realization of electrical structure functions and directly affects the calculation logic of the core generation layer (such as current carrying capacity verification). Therefore, it needs to be included in the encapsulation scope as core data.
[0029] In some embodiments, the segment unit includes a direction vector and a length parameter, the bending unit includes bending angle, bending radius and bending axis parameters; the processing features include punching and chamfering, and the processing feature related parameters include relative position information.
[0030] Here, the lightweight markup language can be JSON, XML, YAML, Protobuf, or a custom binary format. Developers can directly reuse existing tools, significantly reducing system development and maintenance costs. At the same time, both have good readability, which facilitates development, debugging, and troubleshooting. This is especially important for data encapsulation of complex electrical structures. For path units, the segment unit explicitly includes "direction vector and length parameter": the direction vector adopts the form of a three-dimensional vector (x,y,z), which can accurately define the extension direction of the segment unit in space (e.g., if it extends along the positive X-axis, the vector is (1,0,0)). Combined with the length parameter (unit mm), the spatial position and size of the segment unit can be uniquely determined, avoiding directional ambiguity or size deviation. The bending unit includes "bending angle, bending radius, and bending axis parameter". These three parameters are the core elements of the bending feature - the bending angle determines the degree of opening and closing of the bend (e.g., 90° right angle bend, 45° oblique angle bend), the bending radius determines the size of the arc at the bend (directly affecting the mechanical strength and safety compliance of the electrical structure), and the bending axis determines the rotation center of the bend (e.g., bending around the Z-axis, bending around the X-axis). The combination of the three can accurately restore the spatial posture of the bending feature, ensuring that the bending graphics generated by different platforms are consistent.
[0031] For feature units, processing features include punching and chamfering, which are the most common processing techniques for electrical structures (such as cable trays and busbars), covering mainstream application scenarios. Simultaneously, the processing feature parameters are required to include relative position information. This relative position information refers to the coordinate offset of the processing feature relative to the electrical structure body (e.g., the X / Y / Z coordinates of a punch relative to the starting point of a straight line segment), rather than absolute coordinates. Its advantage lies in that when the position of the electrical structure body is adjusted, the processing feature can offset synchronously with the body, without needing to redefine the position parameters, thus improving the flexibility of parameter modification. These specific parameter constraints enable the standardized encapsulation of the general intermediate data layer to move from a "framework description" to a "precise definition," ensuring that the adapter presentation layer can accurately convert the encapsulated data into platform graphics instructions, avoiding graphics generation errors caused by missing or ambiguous data.
[0032] In some embodiments, the adapter presentation layer defines a standardized drawing instruction interface through the abstract factory pattern, and each of the driver modules implements the standardized drawing instruction interface. The standardized drawing instructions include at least one of electrical structure drawing, bending generation, and processing feature creation.
[0033] In the prior art, adapting to different CAD platforms requires the development of a separate set of driver logic, resulting in inconsistent interfaces. Subsequent iterations and upgrades require individual modifications to the driver modules for each platform, which is labor-intensive and prone to errors. The embodiments of this application solve this problem from the architectural level by using the Abstract Factory pattern.
[0034] The Abstract Factory pattern is a classic creational design pattern. Its core logic is to "define an abstract factory interface and an abstract product interface, and create concrete product instances through concrete factory implementation classes." In this embodiment, its application is manifested as follows: a standardized drawing instruction interface is used as the "abstract product interface." This interface includes core instructions such as "electrical structure drawing, bending generation, and machining feature creation." These instructions cover the key stages of the entire electrical structure graphic generation process (from basic ontology drawing to detailed machining feature creation), ensuring the completeness and universality of the interface. Driver modules adapted to different CAD platforms are used as "concrete product instances." Each driver module must implement the standardized drawing instruction interface; that is, each driver module must provide the specific implementation logic of the aforementioned core instructions, but it does not need to concern itself with the implementation methods of other platform driver modules. For example, the "bending generation" instruction is implemented in the SolidWorks driver module by calling the FeatureManager.CreateBend interface, while in the AutoCAD driver module it is implemented by calling the AddArc interface to draw the bending arc, but their exposed interface names and parameter types are completely identical.
[0035] The core advantage of the above design lies in "unified interface and separated implementation": standardized data transmitted by the general intermediate data layer only needs to call the corresponding driver module through a unified standardized drawing command interface, without needing to adjust the data transmission logic or interface calling method due to different platforms. When a new CAD platform (such as Revit) needs to be added for adaptation, only a new driver module needs to be developed and the standardized drawing command interface needs to be implemented, without changing the overall architecture of the adapter presentation layer; when the API interface of a certain platform is updated, only the internal implementation logic of the corresponding driver module needs to be modified, without affecting other modules and the system core layer. This significantly reduces the workload of driver module development and maintenance, improves the scalability and stability of the system, and ensures that the adapter presentation layer can flexibly adapt to the iterative updates of different CAD platforms.
[0036] In some embodiments, the CAD platform includes at least two of SolidWorks, AutoCAD, Revit, ZWCAD, and WebGL Web, and different driver modules map the standardized drawing instructions to API call instructions of the corresponding CAD platform.
[0037] The CAD platforms used in this application cover mainstream desktop platforms (SolidWorks, AutoCAD, Revit, ZWCAD) and emerging web platforms (WebGL Web platform), covering the main application scenarios in the current electrical design field. It also requires compatibility with at least two platforms to ensure the system avoids the pitfalls of "single-platform dependency." It should be noted that the API interface systems of different CAD platforms vary significantly: SolidWorks, as a 3D modeling software, focuses on "feature creation" (such as extrusion, bending, and drilling interfaces), emphasizing the structured generation of 3D models; AutoCAD combines 2D and 3D drawing functions, and its API focuses on "graphic element drawing" (such as drawing basic graphic elements like lines, arcs, and polygons, and then using Boolean operations to achieve processing features); the WebGL Web platform uses the WebGL API to render graphics for web pages, and its API logic is completely different from that of the desktop platforms.
[0038] The core working mechanism of the driver module is to establish a mapping relationship between "standardized drawing instructions" and "platform-specific APIs." Specifically, after receiving standardized data from the general intermediate data layer, the driver module first parses it to obtain the corresponding standardized drawing instructions (such as "generate a 90° bend"). Then, based on the characteristics of its adapted platform, it converts these standardized instructions into a sequence of API instructions that the platform can directly call. For example, the SolidWorks driver module maps the "generate a 90° bend" instruction to an API call sequence of "get basic contour - call the CreateBend interface to set bending parameters - confirm bend generation"; the AutoCAD driver module maps it to an API call sequence of "calculate the center and radius of the bend arc - call the AddArc interface to draw the arc - call the AddLine interface to draw the straight line segments before and after the bend." This mapping relationship eliminates the need for the core generation layer and the general intermediate data layer to consider the API differences between different platforms, completely decoupling the electrical business logic from the CAD platform.
[0039] In some embodiments, the core generation layer maintains a virtual geometric model corresponding to the electrical structure, which is used to calculate the difference data between the old and new models when parameters are modified. After receiving the difference data, the adapter presentation layer only drives the corresponding CAD platform to update the changed geometric features.
[0040] Here, the virtual geometric model is a digital abstract representation of the electrical structure, corresponding one-to-one with the actual graphic model generated on the CAD platform. However, it does not contain redundant data related to graphic rendering, and only stores the core topological features (such as the parameters of path units and feature units) and physical attribute information of the electrical structure. It can be understood as a "lightweight digital twin of the electrical structure". The core function of the virtual geometric model is "difference calculation": when the user modifies the parameters of the core generation layer (such as line segment length, bending angle, punch hole diameter, etc.), the core generation layer does not directly recalculate all the data of the entire electrical structure. Instead, it calls the virtual geometric model, substitutes the modified parameters into the model, and compares it with the model data before the modification feature by feature, accurately extracting only the changed difference data. For example, if the user changes the length of a straight line segment from 2000mm to 2500mm, the virtual geometric model only extracts the difference data that "the length of the straight line segment increased by 500mm" after comparison. Other unmodified feature data (such as bending angle and punch hole position) are not involved.
[0041] The difference data is encapsulated by a general intermediate data layer and then transmitted to the adapter presentation layer. The adapter presentation layer generates only corresponding local update instructions based on the difference data, driving the CAD platform to update only the changed geometric features without regenerating the entire electrical structure drawing. For example, regarding the modification of the line segment length mentioned above, the SolidWorks adapter only calls the relevant API to adjust the stretch length of the line segment, and the AutoCAD adapter only adjusts the endpoint coordinates of the corresponding line segment, while other features remain unchanged. The advantages of this incremental update mechanism are: firstly, the amount of difference data is much smaller than the complete model data, significantly reducing the amount of data transferred between layers and improving transmission efficiency; secondly, the CAD platform only needs to handle local update logic, avoiding the complex calculations of regenerating the entire model, improving update efficiency by more than 50%, especially suitable for high-frequency parameter iteration scenarios of complex electrical structures containing dozens of features, significantly reducing the user's design time.
[0042] In some embodiments, the core generation layer may be compiled into a standalone dynamic link library or deployed on a cloud server, and the adapter presentation layer may be a plug-in module running within the corresponding CAD platform process.
[0043] For the core generation layer, two deployment methods are adapted to different scenarios: When compiled as a standalone dynamic link library (DLL), it can be directly integrated into the user's local workstation application. Its advantages include fast local computing speed, no network dependency, and suitability for standalone design scenarios (such as local design work for small businesses or individual designers). Additionally, the DLL file is small and easy to deploy; users only need to place the DLL file in a specified directory to call it. When deployed on a cloud server, the core generation layer provides computing services to multiple end users through a network interface, suitable for enterprise-level collaborative design scenarios—multiple designers can simultaneously connect to the cloud-based core generation layer, share computing resources and design data, and enable multiple people to collaboratively complete the design of the same electrical structure, improving team collaboration efficiency. It is important to emphasize that neither deployment method changes the computing logic of the core generation layer, ensuring consistency of electrical business logic across different scenarios. Users can flexibly choose according to their own needs.
[0044] The adapter presentation layer adopts the form of an "in-process plug-in of the CAD platform." Its core advantage is ensuring stable and efficient interaction with the CAD platform: the in-process plug-in runs directly within the process space of the corresponding CAD platform and can directly call the platform's local API interfaces, avoiding latency and stability issues caused by cross-process communication (such as cross-process data transmission loss and slow call response). Simultaneously, the plug-in form offers excellent ease of use: users can directly install the adapter plug-in through the CAD platform's plug-in installation portal. After installation, the plug-in is integrated into the CAD platform's menu bar or toolbar, allowing users to perform parameter input and cross-platform switching operations without switching applications. Subsequent plug-in upgrades only require updating the plug-in file, eliminating the need to redeploy the entire system. Furthermore, the in-process plug-in can capture real-time graphic operation events from the CAD platform (such as mouse clicks to modify dimensions and dragging graphics), ensuring the timeliness and accuracy of reverse engineering and providing a guarantee for data loop verification.
[0045] Please see Figure 2 , Figure 2 This is a flowchart illustrating steps S201-S204 provided in the embodiments of this application, as shown below. Figure 2 As shown, this application provides a method for generating electrical structures and interacting across platforms that is independent of a CAD platform, including steps S201-S204, which will be described in conjunction with each step.
[0046] In step S201, the core generation layer performs mathematical and physical calculations for current calculation, safety verification, and topology path planning based on the input electrical structure requirement parameters to obtain the original data of the electrical structure. In step S202, the general intermediate data layer uses a general electrical architecture description protocol to standardize and encapsulate the raw data to generate standardized data; In step S203, the adapter presentation layer converts the standardized data into graphic generation instructions for the corresponding CAD platform through the driving module of the CAD platform, thereby driving the CAD platform to complete the generation and display of electrical structure graphics. In step S204, when the electrical structure graphic is manipulated or the core generation layer parameters are modified within the CAD platform, the electrical structure generation and display steps are repeated, or the operations within the CAD platform are reverse-analyzed into standardized data and sent back to the core generation layer for logical verification through the adapter presentation layer, forming a data closed loop.
[0047] First, the core generation layer receives user-input requirements (such as current carrying capacity, material, installation path, etc.) and performs core electrical business calculations such as current carrying capacity calculation (verifying whether the material and thickness can meet the current carrying capacity requirements), safety compliance verification (verifying whether the parameters meet electrical design standards), and topology path planning (planning the extension trajectory of the electrical structure), obtaining raw data containing topology features and physical attributes. Next, the general intermediate data layer encapsulates the scattered raw data into standardized data in a unified format according to a preset general electrical structure description protocol, eliminating data format differences and preparing for cross-platform transmission. Then, the adapter presentation layer, based on the currently used CAD platform, calls the corresponding driver module to parse the standardized data into platform-recognizable graphic instructions, driving the platform to complete graphic generation and display. The entire forward chain ensures the consistency of graphic generation logic across different platforms, and the core calculation and data encapsulation stages are completely independent of the platform.
[0048] Finally, a closed-loop data mechanism of "operation-verification-feedback" is constructed. When a user operates on the drawing within the CAD platform (such as manually modifying dimensions or deleting features), the adapter presentation layer captures these operations and reverse-parses them into standardized data, which is then sent back to the core generation layer. The core generation layer performs logical verification on the returned data (such as verifying whether the modified bending radius meets safety requirements and whether the modified length affects current carrying capacity). If the verification passes, updated original data is generated, and the forward link is repeated to complete the drawing update. If the verification fails, a violation warning is generated, fed back to the CAD platform through the adapter, and the violation operation is prohibited. When the user directly modifies the parameters of the core generation layer, the process directly repeats the forward link to complete the drawing update. This closed-loop design ensures the consistency between user operations and core business logic, avoids design violations caused by manual operations deviating from core calculations, and achieves real-time linkage between parameter modification and drawing updates, ensuring the accuracy and compliance of the design process.
[0049] In some embodiments, when modifying the parameters of the core generation layer, the core generation layer calculates the difference data through a virtual geometric model, and only transmits the difference data to the adapter presentation layer through the general intermediate data layer, driving the CAD platform to incrementally update the graphic features.
[0050] When a user modifies the parameters of the core generation layer (e.g., changing the length of a straight segment from 2000mm to 2500mm, or changing the bending angle from 90° to 60°), the method flow does not directly repeat the entire forward generation process in claim 8. Instead, it adds a crucial step of "difference calculation": First, the virtual geometric model of the core generation layer is triggered. The virtual geometric model loads the old model data before the parameter modification and the new model data after the modification. Through feature-by-feature and parameter-by-parameter comparative analysis, it accurately extracts the difference data that has only changed. The scope of the difference data is strictly limited to "features affected by parameter modification." For example, modifying the length of a straight segment will only produce difference data of "change in the length of the straight segment," and modifying the bending angle will only produce difference data of "change in the angle and arc size of the bending feature." Other unaffected feature data are not included in the difference data. The core value of this step is to significantly reduce the amount of data processing and avoid the repeated calculation and transmission of the entire model data.
[0051] After the difference data is generated, it is encapsulated into standardized difference data by a general intermediate data layer and transmitted to the adapter presentation layer. Based on the standardized difference data, the adapter presentation layer only generates corresponding local update instructions, not complete graphic generation instructions. For example, for modifying the length of a straight line segment, the adapter only generates an instruction to "adjust the coordinates of the endpoints of the straight line segment"; for modifying the bending angle, it only generates an instruction to "redraw the bending arc". Subsequently, the CAD platform only updates the changed geometric features, without needing to regenerate the entire electrical structure graphic. Compared to traditional full model regeneration, this incremental update process significantly improves efficiency: for complex electrical structures containing more than 10 features, full model regeneration may take several seconds or even tens of seconds, while incremental updates only take tens of milliseconds, resulting in an efficiency improvement of over 50%. Especially in the parameter iteration stage of electrical structure design (such as multiple adjustments to path dimensions and optimization of bending parameters), it can greatly reduce user waiting time and improve design efficiency.
[0052] In some embodiments, when it is necessary to switch the target CAD platform, the driver module corresponding to the target CAD platform in the adapter presentation layer is called to achieve the switching of the target CAD platform without modifying the calculation logic of the core generation layer and the encapsulation protocol of the general intermediate data layer.
[0053] The core premise of cross-platform switching is that the computational logic of the core generation layer and the encapsulation protocol of the general intermediate data layer are platform-independent. The electrical business calculations of the core generation layer (such as current verification and path planning) only depend on user requirement parameters and are independent of specific CAD platforms. Therefore, the calculation results of the same set of requirement parameters are completely consistent across different platforms. The encapsulation protocol of the general intermediate data layer is a unified universal standard and is not customized for any platform. Therefore, the standardized data encapsulated from the same set of raw data can be recognized by the driver modules of all compatible platforms. Based on this premise, when it is necessary to switch from the current CAD platform (such as SolidWorks) to the target CAD platform (such as AutoCAD), no modification is required to the computational logic of the core generation layer, nor is any adjustment to the encapsulation protocol of the general intermediate data layer necessary. It is only necessary to trigger the "cross-platform switching" command in the system and call the driver module in the adapter presentation layer that is compatible with the target platform.
[0054] The advantages of the aforementioned switching method are reflected in "low cost, high efficiency, and no data loss." First, it eliminates the need to redevelop core computing logic, avoiding the repetitive work of "redeveloping design tools when switching platforms" in existing technologies, significantly reducing enterprise development and usage costs. Second, the switching process only involves calling the driver module and re-parsing the data, without requiring re-entry of requirement parameters or recalculation, resulting in high switching efficiency and user-friendly operation. Third, the consistency of standardized data ensures the integrity and accuracy of graphic features after cross-platform switching. For example, an electrical cable tray generated in SolidWorks containing 3 straight segments, 2 bent segments, and 1 punch will maintain the same path dimensions, bending parameters, and punch position after switching to AutoCAD, with no feature loss or dimensional deviation. A specific example: When switching from SolidWorks to AutoCAD, after the system triggers the "cross-platform export" command, the core generation layer re-outputs standardized data. The general intermediate data layer directly transmits this data to the AutoCAD driver module. The AutoCAD driver module parses the standardized data into its own API call instructions to generate the corresponding graphics. The entire process takes only a few seconds and requires no user intervention, achieving seamless cross-platform migration.
[0055] In summary, the embodiments of this application have the following beneficial effects: (1) Strong cross-platform compatibility: The three-layer decoupling architecture completely separates the electrical business logic from the CAD platform. With the help of the standardized encapsulation of the general intermediate data layer and the multi-platform driver module of the adapter presentation layer, it can be adapted to a variety of mainstream CAD platforms and Web-based design tools, solving the platform binding problem of existing tools. When enterprises change CAD platforms, they do not need to repurchase or develop tools, which greatly reduces the cost of use.
[0056] (2) High development and maintenance efficiency: The core electrical business logic only needs to be developed once, and can be adapted to multiple CAD platforms through different adapters, avoiding repeated development; during subsequent iterations and upgrades, only the core generation layer or the adapter module of the corresponding platform needs to be modified, without the need to modify the entire platform version synchronously, which significantly reduces the workload of development and maintenance.
[0057] (3) Optimization of interaction efficiency: Incremental updates of graphics are achieved by calculating difference data through virtual geometric models, avoiding the regeneration of the entire model and improving the speed of graphic updates; at the same time, the data closed-loop design ensures the consistency between CAD platform operation and core business logic, reduces the risk of illegal design, and improves the user design experience.
[0058] (4) Excellent scalability: When a new CAD platform emerges, only the corresponding adapter driver module needs to be developed. The system can be quickly connected without changing the core architecture of the system, which can flexibly meet the needs of industry technology development and extend the system life cycle.
[0059] Based on the same inventive concept, this application also provides an electrical structure generation and cross-platform interaction device independent of the CAD platform, which corresponds to the electrical structure generation and cross-platform interaction method independent of the CAD platform in the first embodiment. Since the principle of the device in this application is similar to the above-mentioned electrical structure generation and cross-platform interaction method independent of the CAD platform, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0060] like Figure 3 As shown, Figure 3 This is a schematic diagram of the composition structure of the electronic device 300 provided in the embodiments of this application. The electronic device 300 includes: The device includes a processor 301, a storage medium 302, and a bus 303. The storage medium 302 stores machine-readable instructions executable by the processor 301. When the electronic device 300 is running, the processor 301 communicates with the storage medium 302 via the bus 303. The processor 301 executes the machine-readable instructions to perform the steps of the CAD platform-independent electrical structure generation and cross-platform interaction method described in the embodiments of this application.
[0061] In practical applications, the various components in the electronic device 300 are coupled together via bus 303. It is understood that bus 303 is used to achieve communication between these components. In addition to a data bus, bus 303 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general designated all buses as Bus 303.
[0062] The above-mentioned electronic devices have the following beneficial effects: (1) Strong cross-platform compatibility: The three-layer decoupling architecture completely separates the electrical business logic from the CAD platform. With the help of the standardized encapsulation of the general intermediate data layer and the multi-platform driver module of the adapter presentation layer, it can be adapted to a variety of mainstream CAD platforms and Web-based design tools, solving the platform binding problem of existing tools. When enterprises change CAD platforms, they do not need to repurchase or develop tools, which greatly reduces the cost of use.
[0063] (2) High development and maintenance efficiency: The core electrical business logic only needs to be developed once, and can be adapted to multiple CAD platforms through different adapters, avoiding repeated development; during subsequent iterations and upgrades, only the core generation layer or the adapter module of the corresponding platform needs to be modified, without the need to modify the entire platform version synchronously, which significantly reduces the workload of development and maintenance.
[0064] (3) Optimization of interaction efficiency: Incremental updates of graphics are achieved by calculating difference data through virtual geometric models, avoiding the regeneration of the entire model and improving the speed of graphic updates; at the same time, the data closed-loop design ensures the consistency between CAD platform operation and core business logic, reduces the risk of illegal design, and improves the user design experience.
[0065] (4) Excellent scalability: When a new CAD platform emerges, only the corresponding adapter driver module needs to be developed. The system can be quickly connected without changing the core architecture of the system, which can flexibly meet the needs of industry technology development and extend the system life cycle.
[0066] This application also provides a computer-readable storage medium storing executable instructions. When the executable instructions are executed by at least one processor 301, the method for generating electrical structures independent of the CAD platform and cross-platform interaction described in this application is implemented.
[0067] In some embodiments, the storage medium may be a magnetic random access memory (FRAM), a read-only memory (ROM), or a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM) Electrically Erasable Programmable Read-Only Memory (EEPROM) Read-only memory, flash memory, magnetic surface storage, optical disc, or CD-ROM ROM, Compact Disc Read It can be a memory such as a memory only; or it can be a device that includes one or any combination of the above-mentioned memories.
[0068] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0069] As an example, executable instructions may, but do not necessarily, correspond to files in the file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0070] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0071] The aforementioned computer-readable storage media have the following beneficial effects: (1) Strong cross-platform compatibility: The three-layer decoupling architecture completely separates the electrical business logic from the CAD platform. With the help of the standardized encapsulation of the general intermediate data layer and the multi-platform driver module of the adapter presentation layer, it can be adapted to a variety of mainstream CAD platforms and Web-based design tools, solving the platform binding problem of existing tools. When enterprises change CAD platforms, they do not need to repurchase or develop tools, which greatly reduces the cost of use.
[0072] (2) High development and maintenance efficiency: The core electrical business logic only needs to be developed once, and can be adapted to multiple CAD platforms through different adapters, avoiding repeated development; during subsequent iterations and upgrades, only the core generation layer or the adapter module of the corresponding platform needs to be modified, without the need to modify the entire platform version synchronously, which significantly reduces the workload of development and maintenance.
[0073] (3) Optimization of interaction efficiency: Incremental updates of graphics are achieved by calculating difference data through virtual geometric models, avoiding the regeneration of the entire model and improving the speed of graphic updates; at the same time, the data closed-loop design ensures the consistency between CAD platform operation and core business logic, reduces the risk of illegal design, and improves the user design experience.
[0074] (4) Excellent scalability: When a new CAD platform emerges, only the corresponding adapter driver module needs to be developed. The system can be quickly connected without changing the core architecture of the system, which can flexibly meet the needs of industry technology development and extend the system life cycle.
[0075] In the several embodiments provided in this application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0076] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0077] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0078] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0079] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An electrical structure generation and cross-platform interaction system independent of CAD platforms, characterized in that, It includes a core generation layer, a general intermediate data layer, and an adapter presentation layer. These layers collaborate through data interaction to decouple electrical business logic operations from the graphics platform's driving mechanism. The core generation layer, whose output is connected to the input of the general intermediate data layer, is used to independently perform mathematical and physical calculations related to electrical structures. It does not depend on the kernel and library files of the CAD platform and its operation is independent of the graphical user interface rendering thread. It transmits the raw data obtained from the calculation to the general intermediate data layer. The general intermediate data layer, whose output is connected to the input of the adapter presentation layer, is used to define a general electrical structure description protocol and to standardize and encapsulate the raw data transmitted by the core generation layer. The data includes the topological characteristics and physical attribute information of electrical components. The adapter presentation layer, with its feedback end connected to the input end of the core generation layer, includes at least one driver module adapted to different CAD platforms. This module converts the standardized data transmitted by the general intermediate data layer into graphic instructions recognizable by the corresponding CAD platform to complete the graphic generation of the electrical structure. Simultaneously, it can reverse-parse the geometric operations within the CAD platform into standardized data and transmit them back to the core generation layer through the feedback end.
2. The system according to claim 1, characterized in that, The general electrical structure description protocol adopts a lightweight markup language format. The topology ontology features are described by an ordered linked list of path units and feature units. The path units include segment units and bend units, and the feature units include processing feature-related parameters.
3. The system according to claim 2, characterized in that, The segment unit includes a direction vector and a length parameter, and the bending unit includes bending angle, bending radius, and bending axis parameters; the processing features include punching and chamfering, and the processing feature-related parameters include relative position information.
4. The system according to claim 1, characterized in that, The adapter presentation layer defines a standardized drawing instruction interface through the abstract factory pattern. Each of the driver modules implements the standardized drawing instruction interface. The standardized drawing instructions include at least one of electrical structure drawing, bending generation, and processing feature creation.
5. The system according to claim 4, characterized in that, The CAD platform includes at least two of SolidWorks, AutoCAD, Revit, ZWCAD, and WebGL Web client. Different driver modules map the standardized drawing instructions to the API call instructions of the corresponding CAD platform.
6. The system according to claim 1, characterized in that, The core generation layer maintains a virtual geometric model corresponding to the electrical structure, which is used to calculate the difference data between the old and new models when parameters are modified. After receiving the difference data, the adapter presentation layer only drives the corresponding CAD platform to update the changed geometric features.
7. The system according to claim 1, characterized in that, The core generation layer can be compiled into an independent dynamic link library or deployed on a cloud server, and the adapter presentation layer is a plug-in module running within the corresponding CAD platform process.
8. A method for generating electrical structures and interacting across platforms, independent of a CAD platform, characterized in that, Applied to the system according to any one of claims 1-7, the method includes the following steps: The core generation layer performs mathematical and physical calculations for current calculation, safety verification, and topology path planning based on the input electrical structure requirement parameters to obtain the raw data of the electrical structure. The general intermediate data layer uses a general electrical architecture description protocol to standardize and encapsulate the raw data, generating standardized data. The adapter presentation layer converts the standardized data into graphic generation instructions for the corresponding CAD platform through the corresponding CAD platform's driver module, thereby driving the CAD platform to generate and display the electrical structure graphics. When operating on electrical structure graphics or modifying core generation layer parameters within the CAD platform, the electrical structure generation and display steps are repeated, or the operations within the CAD platform are reverse-analyzed into standardized data and sent back to the core generation layer for logical verification through the adapter presentation layer, forming a data closed loop.
9. The method according to claim 8, characterized in that, When modifying the parameters of the core generation layer, the core generation layer calculates the difference data through the virtual geometric model, and only transmits the difference data to the adapter presentation layer through the general intermediate data layer to drive the CAD platform to incrementally update the graphic features.
10. The method according to claim 8, characterized in that, When it is necessary to switch the target CAD platform, the corresponding driver module of the target CAD platform in the adapter presentation layer is called to achieve the switching of the target CAD platform without modifying the calculation logic of the core generation layer and the encapsulation protocol of the general intermediate data layer.