A method for generating Archicad parametric components using Grasshopper
By encapsulating the GDL commands into Grasshopper operators, the problem of high threshold for making GDL parameterized components in Archicad is solved, and designers can quickly generate complex parameterized components without programming, improving construction efficiency and flexibility.
Patent Information
- Application Number
- CN202410551007.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-05-07
AI Technical Summary
The threshold for making GDL parameterized components in the existing Archicad software is high, and it is difficult for designers to quickly and easily produce complex parameterized components, which limits the promotion and development of the software.
By encapsulating the GDL commands as operators in Grasshopper, designers can operate graphical operators on the Grasshopper platform to generate GDL parameterized components, simplifying the code writing process and lowering the operation threshold.
It enables designers to quickly generate GDL parameterized components without learning programming languages, reducing learning costs and operational complexity, and improving the construction efficiency and flexibility of parameterized components.
Smart Images

Figure CN118485564B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of BIM technology, and in particular to a method for generating Archicad parametric components by using Grasshopper. Background Art
[0002] As a basic element in building information modeling, parametric components allow designers to quickly adjust designs by modifying parameters. They are the core embodiment of the BIM concept. Among the mainstream BIM software, Revit, Bentley, and Archicad provide family editing tools, GenerativeComponents tools, and GDL tools (Graphic Description Language) to create parametric components. Among them, Revit's family editing interface follows the designer's modeling habits, and the production of parametric components can be completed using graphical operations; Bentley has further upgraded on this basis, retaining graphical operations while introducing a graphical programming language, which greatly improves the flexibility of parametric component design; and the GDL programming language, which was born in 1983, retains many features of assembly language and has a high entry threshold. Therefore, in the existing market ecology, the overall number of Archicad's parametric components is far less than that of Revit and Bentley. The high threshold for the production of GDL parametric components has greatly restricted the promotion of Archicad.
[0003] GDL is a parametric programming language similar to Basic built into the Archicad software. It is the core tool for making Archicad parametric components. It has flexible and powerful parametric component production capabilities. Its writing tends to be more like the older assembly language. For example, to define a polyline, you need to manually calculate the coordinate information of each position point and enter them one by one. The overall code writing is complex, the function definition is complex, and the readability is poor, which severely restricts its development. In 2020, Archicad officially launched the visual programming language Param-O through the encapsulation of GDL. It has a more intuitive user interface and workflow, so that even designers without a programming background can make parametric components, but they can only make simpler parametric components, and their flexibility is greatly reduced compared to GDL. Therefore, how to enable designers to quickly and easily make parametric components to form a good software ecosystem is a key issue facing the further development of Archicad. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] Based on the above problems, the present invention provides a method for generating Archicad parametric components using Grasshopper, which solves the problems of high difficulty, slow speed and poor readability in flexibly generating parametric components using GDL language.
[0006] (II) Technical solution
[0007] Based on the above technical problems, the present invention provides a method for generating Archicad parametric components using Grasshopper, comprising the following steps:
[0008] S1. Parse GDL commands and encapsulate the GDL commands required for graphics processing into operators in Grasshopper;
[0009] S2. Placing the operator required for the graphic operation in Grasshopper to generate a parametric component;
[0010] S3, outputting the GDL code text corresponding to the parametric component in Grasshopper;
[0011] S4. Copy the GDL code text into Archicad to obtain an Archicad parametric component.
[0012] Furthermore, the S1 includes:
[0013] S11. Parsing and encapsulating GDL control flow commands: Reconstruct the underlying code of Grasshopper, introduce the logic of GDL programming language, embed GDL control flow commands into Grasshopper code, and encapsulate GDL control flow commands as control flow operators in Grasshopper;
[0014] S12. Parsing and encapsulating GDL coordinate transformation commands: Establishing a coordinate transformation system between Grasshopper and GDL, transposing the plane-based transformation rules in Grasshopper into the transformation rules in GDL, and realizing the transformation of the coordinate transformation operator in Grasshopper;
[0015] S13. Parsing and packaging of GDL shape commands: packaging the GDL shape commands separately as independent operators in Grasshopper to obtain shape operators.
[0016] Furthermore, the S3 also includes: previewing the text and parameterized components.
[0017] Furthermore, it also includes:
[0018] S5. Testing and compiling the Archicad parametric component.
[0019] Furthermore, the GDL control flow commands include IF conditional judgment, FOR loop, WHILE loop and DO-WHILE loop.
[0020] Furthermore, the GDL coordinate transformation command includes movement ADD, scaling MUL, matrix transformation XFORM, three-axis rotation ROT and single-axis rotation ROTX, ROTY, ROTZ, the movement ADD represents movement in the XYZ direction, the MUL represents scaling on the XYZ axis, the XFORM represents matrix transformation, the three-axis rotation ROT represents rotation about the XYZ axis, and the single-axis rotation ROTX, ROTY, ROTZ respectively represent rotation around the X, Y, and Z axes.
[0021] Furthermore, the GDL shape commands include Block, Cylind, Cone, Prism, Create Point ByXYZ, Create Point By Point, Create Polyline By Polyline and Create Mesh By Mesh, wherein Block represents inputting XYZ to generate a cuboid, Cylind represents inputting height and radius to generate a cylinder, Cone represents inputting height, bottom radius and top radius to generate a frustum, and inputting an angle to control the inclination of the upper and lower planes, Prism represents inputting a polyline and height to generate an extruded object, Create Point By XYZ represents creating a GDL point by using XYZ values, Create Point By Point represents converting points in Grasshopper into points in GDL, Create Polyline By Polyline represents converting lines in Grasshopper into lines in GDL, and CreateMesh By Mesh represents converting meshes in Grasshopper into meshes in GDL.
[0022] Furthermore, the “>>>” symbol at the top of the operator indicates the running order.
[0023] Furthermore, the control flow operator can nest sub-loops within the loop, and the control flow symbols at the top of the sub-loop and the control flow symbols at the top of the main loop use different colors.
[0024] Furthermore, the coordinate system of GDL adopts a 4*3 matrix transformation rule, and the coordinate system of Grasshopper adopts a 4*4 matrix transformation rule.
[0025] (III) Beneficial effects
[0026] The above technical solution of the present invention has the following advantages:
[0027] (1) The present invention encapsulates the GDL commands required for graphics processing into operators in Grasshopper, so that designers can generate GDL parametric components by placing various operators just like operating Grasshopper, simplifying the complex GDL code writing process into a graphical process, so that designers do not need to learn an additional programming language, and can quickly create GDL parametric components using Grasshopper, which is commonly used by designers, thereby lowering the operational threshold for generating GDL parametric components and reducing the learning cost of designers;
[0028] (2) The present invention no longer uses Archicad to input the points that constitute the line segment one by one, but uses Grasshopper to pick up lines and other operations, which makes the construction of complex components simpler and more convenient, greatly speeds up the construction efficiency of parametric components, and retains the flexibility advantage of GDL;
[0029] (3) The present invention also implements preview of parametric components and code through Grasshopper, thereby enhancing the readability of GDL code. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:
[0031] Figure 1 A flowchart of a method for generating Archicad parametric components using Grasshopper according to an embodiment of the present invention;
[0032] Figure 2 This is a schematic diagram of the original operator of Grasshopper of the present invention;
[0033] Figure 3 A schematic diagram of an operator for adding control flow to Grasshopper according to an embodiment of the present invention;
[0034] Figure 4 A preview window of the GDL code generated by Grasshopper according to an embodiment of the present invention;
[0035] Figure 5 A preview window of a parametric component generated by Grasshopper according to an embodiment of the present invention;
[0036] Figure 6 This is a schematic diagram of a target parameterized component according to Embodiment 1 of the present invention;
[0037] Figure 7This is a schematic diagram of the Grasshopper operator code according to the first embodiment of the present invention;
[0038] Figure 8 This is a schematic diagram of the GDL code of the first embodiment of the present invention;
[0039] Fig. 9 The GDL parameterized component setting interface of the first embodiment of the present invention;
[0040] Fig.10 This is a schematic diagram of a target parameterized component according to a second embodiment of the present invention;
[0041] Fig.11 This is a schematic diagram of the Grasshopper operator code of the second embodiment of the present invention;
[0042] Fig.12 This is a schematic diagram of the GDL code of the second embodiment of the present invention. DETAILED DESCRIPTION
[0043] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0044] Grasshopper is a graphical programming tool frequently used by architects and is highly favored for its remarkable flexibility. The present invention aims to bridge the gap between Grasshopper and GDL by encapsulating and reconstructing various complex functions of GDL, so that architects can directly perform GDL programming on the Grasshopper platform, thereby realizing the rapid production of parametric components in Archicad.
[0045] A method for generating Archicad parametric components using Grasshopper according to an embodiment of the present invention is as follows: Figure 1 As shown, the following steps are included:
[0046] S1. Parse GDL commands and encapsulate the GDL commands required for graphics processing into operators in Grasshopper;
[0047] As a quasi-functional programming language, GDL can complete the production of parametric components by calling packaged commands. Before encapsulating the GDL language commands, the GDL syntax needs to be parsed. GDL commands mainly include three categories: control flow commands, coordinate transformation commands, and shape commands. Grasshopper does not fully support GDL commands. The three categories of commands are described in detail.
[0048] S11. Parsing and encapsulating GDL control flow commands: Reconstruct the underlying code of Grasshopper, introduce the logic of GDL programming language, embed GDL control flow commands into Grasshopper code, and encapsulate GDL control flow commands as control flow operators in Grasshopper;
[0049] GDL control flow command analysis: mainly IF conditional judgment, FOR loop, WHILE loop, DO-WHILE loop, etc. The analysis of GDL control flow commands mainly includes two aspects. One is the syntax writing specifications of different control flows, such as the IF, THEN, ELSE, ENDIF keywords and uppercase specifications in IF conditional judgment, and the other is the indentation relationship of the line. The above operations can ensure the readability of the generated GDL code text, which is convenient for later testing and maintenance.
[0050] Since Grasshopper does not provide support for conditional and loop structures, it is necessary to reconstruct the underlying code of Grasshopper, introduce the logic of the GDL programming language, and embed conditional statements and loop statements into the Grasshopper code.
[0051] The refactored operator adds a control flow function, which is represented by the ">>>" symbol at the top of the operator to facilitate the display of the statement execution order when placing the operator of the control flow command in Grasshopper. Sub-loops can be nested layer by layer inside the loop, which makes up for the defect that Grasshopper itself cannot perform conditional judgment and looping. The control flow symbol color at the top of the sub-loop is designed to be different from the main loop, such as Figure 2 and Figure 3 shown.
[0052] S12. Parsing and encapsulating GDL coordinate transformation commands: Establishing a coordinate transformation system between Grasshopper and GDL, transposing the plane-based transformation rules in Grasshopper into the transformation rules in GDL, and realizing the transformation of the coordinate transformation operator in Grasshopper;
[0053] GDL coordinate transformation command analysis: mainly includes four categories: move (ADD), rotate (ROT), scale (MUL), and matrix transformation (XFORM); rotation (ROT) includes commands for three-axis rotation and single-axis rotation. Single-axis rotation includes "ROTX", "ROTY", "ROTZ", etc. for rotation of X, Y, and Z axes respectively.
[0054] All parametric components in GDL are built on the local coordinate system. Placing any object requires two steps. First, coordinate transformation is required, including four types of operations: move (ADD), rotate (ROT), scale (MUL), and matrix transformation (XFORM). The transformation information is stored in the stack, and the DEL n command can be used to return the transformation status n times ago. Secondly, the object is created, such as using Block a, b, c to create a cuboid with a length, width, and height of a, b, and c.
[0055] However, there are significant differences in the coordinate system transformations of GDL and Grasshopper, which correspond to 4*3 and 4*4 matrix transformation rules respectively. Therefore, it is necessary to build a bridge between the two. A coordinate transformation system between Grasshopper and GDL was established, and the plane-based transformation rules in Grasshopper were transposed to the transformation rules in GDL, that is, the 4*3 matrix was converted to the 4*4 matrix, so as to minimize the changes in the usage habits of Grasshopper platform users.
[0056] In the coordinate transformation operator, ADD indicates movement in the XYZ direction, ROT indicates rotation about the XYZ axis, ROTX, ROTY, and ROTZ indicate rotation about the X, Y, and Z axes respectively, MUL indicates scaling on the XYZ axis, and XFORM indicates matrix transformation.
[0057] S13. Parsing and packaging of GDL shape commands: packaging the GDL shape commands separately as independent operators in Grasshopper to obtain shape operators;
[0058] GDL shape command analysis: Shape commands can generate 3D and 2D shapes. Taking 3D shapes as an example, GDL commands for creating basic shapes include Block, Brick, Cylind, Sphere, Ellips, Cone, etc., and commands for creating complex shapes include Prism, Revolve, Ruled, etc. There are significant differences between GDL shape creation rules and Grasshopper, so GDL shape commands need to be separately encapsulated as independent operators in Grasshopper to accommodate their differences.
[0059] Using GDL to define a shape requires multiple parameters. Objects are usually drawn based on points. When the shape becomes more complex, users need to calculate the X, Y, and Z values of each point, which greatly increases the workload. However, drawing shapes in Grasshopper is very free and easy. Therefore, various shape functions of GDL are encapsulated to simplify the generation of shapes in GDL.
[0060] In the shape operator, Block means that a cuboid can be generated by inputting XYZ and "attribute operator", Cylind means that a cylinder can be generated by inputting height and radius, Cone means that a frustum can be generated by inputting height, bottom radius, and top radius, and the angle can be input to control the inclination of the upper and lower planes, Prism means that an extruded object can be generated by inputting a polyline and height, Create PointBy XYZ means creating GDL points by XYZ values, Create Point By Point means converting points in Grasshopper into points in GDL, Create Polyline By Polyline means converting lines in Grasshopper into lines in GDL, and Create Mesh By Mesh means converting meshes in Grasshopper into meshes in GDL.
[0061] S2. Placing the operator required for the graphic operation in Grasshopper to generate a parametric component;
[0062] The graphic operations in this step include generating parametric components from scratch and generating new parametric components based on existing parametric components.
[0063] To generate a parametric component from scratch, you need to first create adjustable parameters, and then build the parametric component by placing control flow operators, coordinate transformation operators, and shape operators.
[0064] In addition, existing parametric components can be modified without first creating adjustable parameters. New parametric components can be generated directly by placing control flow operators, coordinate transformation operators, and shape operators.
[0065] S3, outputting the GDL code text corresponding to the parametric component in Grasshopper, and previewing the text and the parametric component;
[0066] After generating a shape in Grasshopper, right-click the "Begin" component and select the "Create Code" option to generate a GDL code preview box.
[0067] Figure 4 This is the generated code preview box. The text in the middle is the GDL code. From left to right, there are four functions below it: code line number display, copy, save as .txt document, and update code preview box. To enhance the readability of the generated GDL code, the program has adjusted the indentation to form a good code style.
[0068] In addition to providing text generation, it also implements the preview of GDL components in Grasshopper, such as Figure 5 As shown in the figure, taking the generation of Block components in GDL as an example, after reading the four parameters of Block (a, b, c, attribute), the API related to the cuboid in Grasshopper is called for reconstruction, and the same is true for other components such as Prism operators.
[0069] S4. Copy the GDL code text into Archicad to obtain Archicad parametric components;
[0070] After clicking the Copy button, open Archicad, create a new GDL file, and place the copied content into the script. It should be noted that due to the limitation of the computer system clipboard capacity, the copy will fail if the number of bytes of the generated code exceeds a certain limit. Therefore, the plug-in provides a Save button to support users' large-scale text copying needs. Thus, Archicad parametric components are obtained.
[0071] S5, testing and compiling the Archicad parametric component;
[0072] After receiving the copied file in the GDL script editor, you can test the entire code and correct code errors by combining GDL's "Check Script" command, 2D preview view, and 3D preview view.
[0073] After the implementation of step S1 of the present invention, the first embodiment of the present invention generates a parametric component from scratch, generates a GDL parametric table using Grasshopper, and exposes relevant parameters to the user in GDL for the designer to perform parametric adjustment. The overall effect is as follows Figure 6 The specific operations are as follows:
[0074] Step 1. Create 6 parameters that can be adjusted by the designer, namely, table leg width (LegWid), table leg length (LegLen), table leg height (LegHei), table width (Wid), table length (Len), table height (Hei);
[0075] Step 2: After creating the table legs using the BOX operator at the origin, use the ADD operator to move them in the X and Y directions to obtain the other three table legs.
[0076] Step 3: After moving the origin of the table top to the specified position using the ADD operator, use the mathematical operator MATH to subtract the height of the table legs from the height of the table to obtain the thickness of the table top, and combine the length and width parameter values of the table to obtain the shape of the table top;
[0077] Step 4: Use a FOR loop calculator, combined with an ADD calculator and a BOX calculator, to draw the tabletop ribs, and the rib density can be controlled by the quantity.
[0078] Figure 7 is an operation calculator for Grasshopper. Figure 8 is the generated GDL code. After placing the component, the designer can set the length, width, and height of the component or the length, width, and height of the table legs as follows Fig. 9 As shown, this embodiment demonstrates the general process of using Grasshopper to generate GDL components. Compared with directly asking the designer to write completely unfamiliar GDL code, this method generates parametric components based on the Grasshopper platform familiar to the designer, greatly reducing the learning cost of the designer.
[0079] In the second embodiment of the present invention, it is modified on the basis of the existing parametric component. Pick up a curve in Grasshopper for extrusion and movement operations, and delete the components with 2 < n < 7, that is, the 3rd, 4th, and 5th extruded components. The overall effect is as Fig.10 shown. The specific operations are as follows:
[0080] Step 1: Place a Begin calculator and a FOR calculator. The input ends are two integers, 0 and 10, and the variable end will output an integer sequence from 0 to 10.
[0081] Step 2: Place operator calculators, namely ">" and "<", to screen out all values greater than 2 and less than 7 in the integer sequence from 0 to 10, and use an AND logic calculator to take the union of the two. Finally, take the value output from the False end in the IF calculator to obtain seven integer values: 0, 1, 2, 6, 7, 8, and 9.
[0082] Step 3: Place a move calculator to move the coordinates of the object to be generated (that is, move 0, 1, 2, 6, 7, 8, 9 along the X-axis respectively) to avoid overlap.
[0083] Step 4: Pick up a curve in Grasshopper and use the Create Polyline By Polyline calculator to convert it into a curve in GDL.
[0084] Step 5: Use the Prism calculator, input the curve polyline and the extrusion height h (that is, 0, 1, 2, 6, 7, 8, 9), to generate a set of serialized shapes.
[0085] Fig.11 is an operation calculator for Grasshopper. Fig.12For the generated GDL code, compared with operations such as picking lines in Grasshopper, GDL needs to input the points that make up the line segment one by one, and as the complexity of the line segment increases, a lot of time will be wasted.
[0086] Finally, it should be noted that the above-mentioned control method can be converted into software program instructions, which can be implemented by using a control system including a processor and a memory, or by computer instructions stored in a non-transitory computer-readable storage medium. The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0087] In summary, the above method of using Grasshopper to generate Archicad parametric components has the following beneficial effects:
[0088] (1) The present invention encapsulates the GDL commands required for graphics processing into operators in Grasshopper, so that designers can generate GDL parametric components by placing various operators just like operating Grasshopper, simplifying the complex GDL code writing process into a graphical process, so that designers do not need to learn an additional programming language, and can quickly create GDL parametric components using Grasshopper, which is commonly used by designers, thereby lowering the operational threshold for generating GDL parametric components and reducing the learning cost of designers;
[0089] (2) The present invention no longer uses Archicad to input the points that constitute the line segment one by one, but uses Grasshopper to pick up lines and other operations, which makes the construction of complex components simpler and more convenient, greatly speeds up the construction efficiency of parametric components, and retains the flexibility advantage of GDL;
[0090] (3) The present invention also implements preview of parametric components and code through Grasshopper, thereby enhancing the readability of GDL code.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the embodiments of the present invention are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined by the appended claims.
Claims
1. A method for generating Archicad parametric components using Grasshopper, characterized in that: The following steps are involved: S1. Parse GDL commands and encapsulate the GDL commands required for graphics processing into operators in Grasshopper; S11. Parsing and encapsulating GDL control flow commands: Reconstruct the underlying code of Grasshopper, introduce the logic of GDL programming language, embed GDL control flow commands into Grasshopper code, and encapsulate GDL control flow commands as control flow operators in Grasshopper; S12. Parsing and encapsulating GDL coordinate transformation commands: Establishing a coordinate transformation system between Grasshopper and GDL, transposing the plane-based transformation rules in Grasshopper into the transformation rules in GDL, and realizing the transformation of the coordinate transformation operator in Grasshopper; S13. Parsing and packaging of GDL shape commands: packaging the GDL shape commands separately as independent operators in Grasshopper to obtain shape operators; S2. Placing the operator required for the graphic operation in Grasshopper to generate a parametric component; S3, outputting the GDL code text corresponding to the parametric component in Grasshopper; S4. Copy the GDL code text into Archicad to obtain an Archicad parametric component.
2. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The S3 further includes: previewing the text and parameterized components.
3. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: Also includes: S5. Testing and compiling the Archicad parametric component.
4. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The GDL control flow commands include IF conditional judgment, FOR loop, WHILE loop and DO-WHILE loop.
5. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The GDL coordinate transformation commands include movement ADD, scaling MUL, matrix transformation XFORM, three-axis rotation ROT and single-axis rotation ROTX, ROTY, ROTZ. The movement ADD indicates movement in the XYZ direction, the MUL indicates scaling on the XYZ axis, the XFORM indicates matrix transformation, the three-axis rotation ROT indicates rotation about the XYZ axis, and the single-axis rotation ROTX, ROTY, ROTZ respectively indicate rotation around the X, Y, and Z axes.
6. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The GDL shape commands include Block, Cylind, Cone, Prism, Create Point By XYZ, CreatePoint By Point, Create Polyline By Polyline and Create Mesh By Mesh. Block means generating a cuboid by inputting XYZ, Cylind means generating a cylinder by inputting height and radius, Cone means generating a truncated cone by inputting height, bottom radius and top radius, and inputting angle to control the inclination of the upper and lower planes, Prism means generating an extruded object by inputting a polyline and height, Create Point By XYZ means creating a GDL point by XYZ value, Create Point By Point means converting points in Grasshopper into points in GDL, CreatePolyline By Polyline means converting lines in Grasshopper into lines in GDL, and Create Mesh ByMesh means converting meshes in Grasshopper into meshes in GDL.
7. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The ">>>" symbol at the top of the operator indicates the running order.
8. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The control flow operator can nest sub-loops layer by layer inside the loop, and the control flow symbols at the top of the sub-loop and the control flow symbols at the top of the main loop use different colors.
9. The method for generating Archicad parametric components using Grasshopper according to claim 1, characterized in that: The coordinate system of GDL adopts a 4*3 matrix transformation rule, and the coordinate system of Grasshopper adopts a 4*4 matrix transformation rule.