Engineering drawing user-defined label creating method based on 3DE secondary development
Through secondary development on the 3DE platform, the extended feature data model and interface are created, and the creation and construction of custom annotations are realized, which solves the problem of insufficient annotation types on the platform, and improves the flexibility of the design process and the maintainability of the annotation function.
Patent Information
- Application Number
- CN202510370315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-27
AI Technical Summary
The 3DE platform has limited types of engineering drawings and cannot adapt to the engineering drawing standards of various industries, and lacks custom annotation creation methods.
Through the method based on 3DE secondary development, we create an extended feature data model, attribute read and write interface and appearance construction interface, and realize the extended interface of 2D components and 2D views, and call these interfaces to create custom annotations and build appearance.
It realizes custom annotation of any shape on the 3DE platform, opens up the forward design process from three-dimensional model to two-dimensional engineering drawings, and improves the reusability and maintainability of the annotation function.
Smart Images

Figure CN120215902A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of three-dimensional design and application, and specifically relates to a method for creating custom annotations for engineering drawings based on 3DE secondary development. Background Art
[0002] 3DE is Dassault's 3DExperience collaborative design platform, which is the mainstream 3D design collaborative platform in the water conservancy and hydropower industry, with functions such as collaborative design, analysis and calculation, construction simulation, and data management. The system is based on a single data source system architecture and uses 3D visualization models as carriers to achieve real-time updating, circulation, and utilization of design information.
[0003] The 3DE platform is at the world's leading level in three-dimensional modeling, especially complex surface modeling. However, for engineering drawing production, especially engineering drawing annotation, it only provides a few general annotations, which cannot meet the requirements of engineering drawing production standards in various industries.
[0004] Therefore, it is necessary to develop a custom annotation creation method based on the 3DE platform that can adapt to the engineering drawing production standards of various industries. Summary of the invention
[0005] The present invention is proposed to solve the above-mentioned shortcomings, and its purpose is to provide a method for creating custom annotations for engineering drawings based on 3DE secondary development. The method solves the problem that the 3DE platform has few types of engineering drawing annotations and cannot adapt to the engineering drawing output standards of various industries. It realizes the construction of custom annotations for engineering drawings of arbitrary shapes and opens up the forward design process from three-dimensional models to two-dimensional engineering drawings.
[0006] In order to achieve the above purpose, the present invention adopts the following scheme:
[0007] A method for creating custom annotations for engineering drawings based on 3DE secondary development, characterized in that it includes the following steps:
[0008] Step S1, creating an extended feature data model based on the 3DE platform, and creating an attribute read-write interface and an appearance construction interface and implementation;
[0009] Step S2, creating a 2D component extension interface and implementation, used to add an extension interface to the 2D component;
[0010] Step S3, creating a 2D view extension interface and implementation, used to add an extension interface for the 2D view;
[0011] Step S4, calling the 2D view extension interface to create a custom annotation;
[0012] Step S5, calling the custom annotation extended feature shape construction interface to construct the shape.
[0013] As a preferred embodiment, in the step S1, the base feature of the extended feature is a 2D component, and a custom annotation shape is formed by combining two-dimensional geometric elements and two-dimensional annotation elements.
[0014] As a preferred embodiment, in the step S1, creating the extended feature data model specifically includes the following steps: using the CATfctEditorAssistant tool to create an empty CATfct file and decompile the corresponding editable osm file; editing the osm, adding the extended feature CJWAnnoExt and its attributes for storing custom annotation data, adding metadata data, and setting Extends=["DrwDetail"]; using the CATfctEditorAssistant tool again to update the CATfct file with the osm file as the input; placing the updated CATfct file in the CATGraphicPath directory of the 3DE runtime environment.
[0015] As a preferred embodiment, in the step S1, creating the attribute reading and writing interface specifically includes the following steps: creating a new CJWIAnnoExt interface, and defining virtual methods Get() and Set() corresponding to the attributes on the custom feature CJWAnnoExt in the interface;
[0016] Creating the shape construction interface specifically includes the following steps: creating a new CJWIAnno interface, and defining a virtual method BuildGraph() in the interface;
[0017] As a preferred embodiment, in the step S1, implementing the attribute reading and writing interface specifically includes the following steps: creating a new CJWEAnnoExt component, implementing the CJWIAnnoExt interface on the extended feature CJWAnnoExt using the TIE method, and writing code to implement the Get and Set methods of the attributes to realize the reading and writing of attributes;
[0018] Implementing the shape construction interface specifically includes the following steps: creating a new CJWEAnnot component, implementing the CJWIAnno interface on the extended feature CJWAnnoExt using the TIE method, and writing code to implement the BuildGraph() method.
[0019] As a preferred embodiment, in the step S2, creating and implementing the 2D component extension interface specifically includes the following steps:
[0020] Step S21, creating the 2D component extension interface: creating a new CJWIAnnoExtMgnt interface, and defining a virtual method AddAnnoExt() in the interface;
[0021] Step S22, implement the 2D component extension interface: create a CJWEDrwDetailAnnoExtMgnt component, use the TIE method to implement the CJWIAnnoExtMgnt interface on the feature DrwDetail, and write an AddAnnoExt() method to implement the addition of the custom feature CJWAnnoExt.
[0022] As a preferred implementation, the creation and implementation of the 2D view extension interface in step S3 specifically include the following steps:
[0023] Step S31, create the 2D view extension interface: create a new CJWIAnnoFactory interface, and define a virtual method CreateAnno() in the interface;
[0024] Step S32, implement the 2D view extension interface: create a CJWEViewAnnoFactory component, use the TIE method to implement the CJWIAnnoFactory interface on the feature View, and write a CreateAnno() method to implement the creation of custom annotations.
[0025] As a preferred implementation, the specific steps for calling the 2D view extension interface to create custom annotations in step S4 are as follows: obtain the custom annotation creation interface CJWIAnnoFactory through the 2D view object in the interactive command, and use the CreateAnno() method in the CJWIAnnoFactory interface to create custom annotations.
[0026] As a preferred implementation, the specific steps for calling the custom annotation extension feature shape construction interface to construct the shape in step S5 are as follows: through the custom annotation object created in step S4, obtain the shape construction interface CJWIAnno on its extended feature, and use the BuildGraph() method in the CJWIAnno interface to create or update the custom annotation shape.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] First, the method of the present invention forms a complete technical route of "custom annotation data model - interface extension - annotation creation - annotation shape construction" through the extension and management of custom annotations, enabling developers to deeply customize engineering drawing annotations in a 3DE environment. Decompose the creation and management of custom annotations into several steps, and cooperate with the definition and implementation of interfaces, which is convenient for subsequent maintenance and secondary development. Overall, separate the "data and shape" of the annotation, and achieve unified call through interface programming, significantly improving the reusability and maintainability of the annotation function.
[0029] Second, by using existing 2D components as base features, existing 2D geometric elements and 2D dimensioning elements in 3D software can be directly reused, reducing the development difficulty and implementation complexity of custom dimensioning; the editing capabilities of geometry and dimensioning already possessed by 2D components can be fully utilized, making the newly created custom dimensioning more stable and reliable at the rendering, display, and interaction levels.
[0030] Third, by using the CATfctEditorAssistant tool, during the processes of creating, decompiling, editing, and recompiling the CATfct file, the present invention ensures consistency or compatibility with the data structure of the 3DE platform itself, reducing manual operation errors; incorporates the data storage and metadata management of extended features into the unified environment of the 3DE platform, facilitating data loading, rendering, and subsequent upgrades, while having better platform consistency and security; places the extended features in the CATGraphicPath directory, conforming to the path search rules of the 3DE software, thereby ensuring that the custom dimensioning function can be automatically retrieved and activated during runtime.
[0031] Fourth, through the combination of the attribute reading / writing interface and the shape construction interface, the present invention constructs a clear interface between the "data access layer" and the "shape generation layer", clearly defining their responsibilities: custom dimensioning data (such as text, dimensions, symbols, etc.) can be accessed and stored through a unified Get / Set method, enabling developers to more flexibly manipulate dimensioning data during subsequent function expansion; the shape construction interface BuildGraph() centralizes the shape rendering logic for management and can be uniformly called in different scenarios (such as redrawing, updating, deforming, etc.), improving reusability and maintainability.
[0032] Fifth, by implementing the interface in a componentized and TIE manner, on the one hand, it conforms to the 3DE plug-in development architecture, and on the other hand, it ensures the independence of the custom dimensioning function from the characteristics of the original system; encapsulates the attribute reading / writing function and the shape construction function in different components, avoiding a single component from undertaking multiple responsibilities simultaneously, improving the scalability and maintainability of the system. Through the interface + component mode, it is also convenient to customize or replace the corresponding components according to specific dimensioning requirements in the later stage, without the need to make large-scale changes to the original project structure.
[0033] Sixth, the present invention sets an extended interface CJWIAnnoExtMgnt at the 2D component level, facilitating the binding of the operation of "adding custom dimensioning" to specific 2D component features, implementing a unified entry (AddAnnoExt) for dimensioning extension management, combining custom dimensioning with the basic functions of 2D components, making the extension of engineering drawing features more natural and controllable, and consistent with the original engineering drawing management logic.
[0034] In summary, from the creation of the data model, the implementation method of the interface to the combination of attribute reading / writing and shape construction, the present invention reflects the hierarchical, component-based, and extensible nature of implementing custom annotations in the 3DE secondary development environment; the development efficiency is improved. By clearly defining the interface and components, the plug-in development in the 3DE environment is made more efficient; the functional extensibility: the levels of "data and shape" and "2D parts and 2D views" are clearly divided, making it easier to expand new annotation types or new interfaces in the future; maintainability and reusability: the interface-based and component-based design improves the reuse degree of the module, and can be smoothly adapted in various scenarios and subsequent version iterations, effectively solving the problems of traditional engineering drawing annotations being difficult to customize flexibly, having high maintenance costs, and being deeply coupled with the platform, and having obvious practical value and technical advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is the component interface model of the method of the present invention;
[0036] Figure 2 is the main step flow of the method of the present invention;
[0037] Figure 3 is the process flow of creating an extended feature data model, interface, and implementation steps;
[0038] Figure 4 is the program flow of the extended feature to implement the BuildGraph() method;
[0039] Figure 5 is the process flow of creating a 2D part interface and implementation steps;
[0040] Figure 6 is the process flow of creating a 2D view interface and implementation steps;
[0041] Figure 7 is the program flow of the 2D view to implement the CreateAnno() method;
[0042] Figure 8 is an example of a steel bar annotation implemented by using the method of the present invention;
[0043] Figure 9 is an example of a view annotation implemented by using the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0045] It should be understood that the drawings are only for illustrative purposes and should not be construed as a limitation of this patent; for better illustration of this embodiment, some components in the drawings will be omitted, enlarged or reduced, which does not represent the dimensions of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted. The positional relationships described in the drawings are only for illustrative purposes and should not be construed as a limitation of this patent.
[0046] As Figure 1 shown, the method for creating custom annotations in engineering drawings based on the secondary development of 3DE of the present invention is based on the feature extension mechanism of the 3DE platform and needs to be extended and implemented on 2D views and 2D components to create extended features, interfaces and implementations of 2D components. As Figure 2 shown, this method is divided into five major steps, where the order of steps S1, S2, and S3 can be adjusted. The specific implementation steps include:
[0047] Step S1, create an extended feature data model, interface and implementation
[0048] The base feature of the extended feature is a 2D component. The extended feature needs to define two interfaces, one for reading and writing extended feature attributes and one for constructing a custom shape for the extended feature.
[0049] As Figure 3 shown, the specific implementation steps for creating an extended feature data model, interface and implementation include:
[0050] Step S11, create an extended feature data model. Use the CATfctEditorAssistant tool to create an empty CATfct file and decompile the corresponding editable osm file; edit the osm, add the extended feature CJWAnnoExt and its necessary attributes for storing custom annotation data, add metadata data, and set Extends = ["DrwDetail"]; use the CATfctEditorAssistant tool again with the osm file as the input to update the CATfct file; place the updated CATfct file in the CATGraphicPath directory of the 3DE runtime environment;
[0051] Step S12, create an attribute reading and writing interface. Create a new CJWIAnnoExt interface and define virtual Get() and Set() methods corresponding to the attributes on the custom feature CJWAnnoExt in the interface;
[0052] Step S13, create a shape construction interface. Create a new CJWIAnno interface and define a virtual BuildGraph() method in the interface;
[0053] Step S14, implement the property read / write interface. Create a CJWEAnnoExt component, use the TIE method to implement the CJWIAnnoExt interface on the extended feature CJWAnnoExt, and write read / write property code to implement the Get and Set methods of the property;
[0054] Step S15, implement the shape construction interface. Create a CJWEAnnot component, use the TIE method to implement the CJWIAnno interface on the extended feature CJWAnnoExt, and write code to implement the BuildGraph() method;
[0055] The implementation of BuildGraph() in the CJWEAnnot component is the core step in the whole method. A new custom annotation shape is formed by combining two-dimensional geometric elements and two-dimensional annotation elements. The program flow is as Figure 4 shown.
[0056] Step S2, create a 2D part extension interface and its implementation
[0057] The 2D part is a native feature of the 3DE platform. To conveniently add extended features to the 2D part, it is necessary to add an extension interface to the 2D part.
[0058] As Figure 5 shown, the specific implementation steps for creating a 2D part extension interface and its implementation include:
[0059] Step S21, create a 2D part extension interface. Create a new CJWIAnnoExtMgnt interface and define a virtual method AddAnnoExt() in the interface;
[0060] Step S22, implement the 2D part extension interface. Create a CJWEDrwDetailAnnoExtMgnt component, use the TIE method to implement the CJWIAnnoExtMgnt interface on the feature DrwDetail (2D part), and write the AddAnnoExt() method to implement the addition of the custom feature CJWAnnoExt.
[0061] Step S3, create a 2D view extension interface and its implementation
[0062] The custom annotation is drawn in the 2D view. It is necessary to add an extension interface to the 3DE native feature 2D view to create a custom annotation in the 2D view.
[0063] As Figure 6 shown, the specific implementation steps for creating a 2D view extension interface and its implementation include:
[0064] Step S31: Create a 2D view extension interface. Create a new CJWIAnnoFactory interface and define a virtual method CreateAnno() in the interface.
[0065] Step S32: Implement the 2D view extension interface. Create a new CJWEViewAnnoFactory component and implement the CJWIAnnoFactory interface on the feature View (2D view) using the TIE method. Write the CreateAnno() method to implement the creation of custom annotations. The program flow is as Figure 7 shown.
[0066] Step S4: Call the 2D view extension interface to create custom annotations. Obtain the custom annotation creation interface CJWIAnnoFactory through the 2D view object in the interaction command, and use the CreateAnno() method in the CJWIAnnoFactory interface to create custom annotations.
[0067] Step S5: Call the custom annotation extended feature shape construction interface to construct the shape. Through the custom annotation object created in S4, the shape construction interface CJWIAnno on its extended feature can be obtained, and the BuildGraph() method in the CJWIAnno interface is used to create or update the custom annotation shape. Figure 8 、 Figure 9 The example shown is a custom annotation constructed using this method.
[0068] The above embodiments are merely illustrative examples of the technical solutions of the present invention. The present invention is not limited to what is described in the above embodiments, but is subject to the scope defined by the claims. Any modification, supplement, or equivalent replacement made by those skilled in the art of the present invention based on this embodiment is within the scope protected by the claims of the present invention.
Claims
1. A method for creating custom annotations for engineering drawings based on 3DE secondary development, characterized by: The steps include: Step S1, creating an extended feature data model based on the 3DE platform, and creating an attribute read-write interface and an appearance construction interface and implementation; Step S2, creating a 2D component extension interface and implementation, used to add an extension interface to the 2D component; Step S3, creating a 2D view extension interface and implementation, used to add an extension interface for the 2D view; Step S4, calling the 2D view extension interface to create a custom annotation; Step S5, calling the custom annotation extended feature shape construction interface to construct the shape.
2. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 1 is characterized in that: In the step S1, the base feature of the extended feature is a 2D component, and a custom annotation shape is formed by combining two-dimensional geometric elements and two-dimensional annotation elements.
3. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 1 is characterized in that: In the step S1, creating an extended feature data model specifically includes the following steps: using the CATfctEditorAssistant tool to create an empty CATfct file, and decompile a corresponding editable osm file; editing the osm, adding the extended feature CJWAnnoExt and its attributes for storing custom annotation data, adding metadata data, and setting Extends = ["DrwDetail"]; using the CATfctEditorAssistant tool again to update the CATfct file using the osm file as input; placing the updated CATfct file in the CATGraphicPath directory of the 3DE runtime environment.
4. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 3 is characterized in that: In the step S1, creating the attribute read-write interface specifically includes the following steps: creating a new CJWIAnnoExt interface, defining Get() and Set() virtual methods corresponding to the attributes on the custom feature CJWAnnoExt in the interface; The specific steps of creating the appearance construction interface include: creating a new CJWIAnno interface and defining the BuildGraph() virtual method in the interface.
5. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 4 is characterized in that: In the step S1, the implementation of the attribute read and write interface specifically includes the following steps: creating a new CJWEAnnoExt component, using the TIE method to implement the CJWIAnnoExt interface on the extended feature CJWAnnoExt, and writing the attribute read and write code to implement the Get and Set methods of the attribute; The specific steps to implement the shape construction interface include: creating a new CJWEAnnot component, using the TIE method to implement the CJWIAnno interface on the extended feature CJWAnnoExt, and writing code to implement the BuildGraph() method.
6. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to any one of claims 1 to 5, characterized in that: In step S2, creating a 2D component extension interface and implementation specifically includes the following steps: Step S21, create a 2D component extension interface: create a new CJWIAnnoExtMgnt interface, and define the AddAnnoExt() virtual method in the interface; Step S22, implement the 2D component extension interface: create a new CJWEDrwDetailAnnoExtMgnt component, use TIE to implement the CJWIAnnoExtMgnt interface on the feature DrwDetail, and write the AddAnnoExt() method to add the custom feature CJWAnnoExt.
7. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 6 is characterized in that: The step S3 creates a 2D view extension interface and implementation, specifically including the following steps: Step S31, create a 2D view extension interface: create a new CJWIAnnoFactory interface, and define the CreateAnno() virtual method in the interface; Step S32, implement the 2D view extension interface: create a new CJWEViewAnnoFactory component, use the TIE method to implement the CJWIAnnoFactory interface on the feature View, and write the CreateAnno() method to create a custom annotation.
8. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 7 is characterized in that: The specific steps of calling the 2D view extension interface to create a custom annotation in step S4 are: obtaining the custom annotation creation interface CJWIAnnoFactory through the 2D view object in the interactive command, and using the CreateAnno() method in the CJWIAnnoFactory interface to create a custom annotation.
9. The method for creating custom annotations for engineering drawings based on 3DE secondary development according to claim 8 is characterized in that: The specific steps of calling the custom annotation extended feature shape construction interface to build the shape in step S5 are: through the custom annotation object created in step S4, obtain the shape construction interface CJWIAnno on its extended feature, and use the BuildGraph() method in the CJWIAnno interface to create or update the custom annotation shape.