Method for automatically measuring point coordinates based on user coordinate system in CAD (Computer Aided Design) environment
By establishing a measurement benchmark model of the user coordinate system in the CAD environment, and using measurement functions and mathematical calculations, the system can automatically complete the measurement of point coordinates, solving the problems of measurement complexity and loss of the original point in the user coordinate system, and is suitable for a variety of application scenarios.
Patent Information
- Application Number
- CN202511805194.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-31
AI Technical Summary
In a CAD environment, point measurement operations based on the user coordinate system are complex, requiring manual positioning and transformation, which leads to the loss of the original point name, and requires strong mathematical foundation and complex programming skills.
This paper provides an automatic measurement method for point coordinates based on a user coordinate system in a CAD environment. By establishing a measurement benchmark model in the user coordinate system, the method automatically calculates the coordinate data of the point to be measured using measurement functions and mathematical calculations, thereby reducing the development difficulty.
It enables automatic measurement of point coordinates in the user coordinate system, simplifies the operation process, avoids the loss of original point names, reduces the difficulty of software development, and is suitable for scenarios such as aerospace component docking and assembly, robot path planning, and precision control.
Smart Images

Figure CN121765024A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital design and manufacturing technology, and more particularly to an automatic measurement method for point coordinates based on a user coordinate system in a CAD environment. Background Technology
[0002] Digital design and manufacturing rely on precise spatial data to construct digital models and optimize design schemes through simulation and analysis to implement precision manufacturing. Point coordinates, as a key element in realizing digital model design, play a central role in the entire process. Precise point coordinate measurement is the core support for digital precision manufacturing and plays a crucial role in modern manufacturing and engineering fields. Whether it's aircraft, automobiles, spacecraft, or ships, the design and realization of these complex products depend on precise point data to ensure their geometric accuracy, performance, and functionality. The core competitiveness of digital precision manufacturing stems from the precise control of spatial information, and the foundation of this process is precisely the measurement and application of high-precision point coordinates. Point coordinate measurement technology in the user coordinate system is the key means of obtaining this critical point information.
[0003] In a CAD environment, point coordinate data in a point set under the system coordinate system can be quickly obtained through programming. However, developing point measurement methods in a point set under the user coordinate system is more challenging. Point measurement based on the user coordinate system usually requires the user to manually transform the point location before measuring in the system coordinate system. This process is complex, and the development of programs for user coordinate system modeling and point location transformation is difficult, which can also lead to the loss of original point names. Furthermore, coordinate system matrix transformations between the user coordinate system and the system coordinate system still cannot preserve the original point names and require strong mathematical foundations and complex mathematical calculation programming skills. Summary of the Invention
[0004] The purpose of this invention is to solve the above problems by proposing an automatic measurement method for point coordinates based on the user coordinate system in a CAD environment. This method addresses the issue that existing point coordinate data is usually implemented in the system coordinate system, and point measurement based on the user coordinate system usually requires the user to manually transform the point location before measurement in the system coordinate system. This results in a complex operation process and the loss of the original point name.
[0005] The technical solution of this invention is as follows: This invention provides an automatic measurement method for point coordinates based on a user coordinate system in a CAD environment, comprising: Step 1: Open the model of the point to be measured in the CAD software; Step 2: In the CAD software, select the user coordinate system and the set of points to be measured, P, in the model of the points to be measured; Step 3: By establishing direction control points in the user coordinate system, calculate the coordinates of the points Pi in the set of points to be measured P in the user coordinate system to obtain the name of each point Pi and the corresponding information of the coordinate calculation, thus completing the automatic measurement of point coordinates based on the user coordinate system in the CAD environment.
[0006] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 3 includes: Step 31: Establish four points P1, P2, P3, and P4 in the user coordinate system as direction control points of the user coordinate system; where P1, P2, P3, and P4 are the origin 3 of the user coordinate system, the X-axis control point, the Y-axis control point, and the Z-axis control point, respectively, and each axis control point is any point on the corresponding axis; Step 32: Using the user-selected test point set P, select the i-th test point Pi in the test point set P; where i is a loop variable, with an initial value of 1 and a value range of (1, n), and n is the total number of test points in the test point set P; Step 33: Read the name Pin of the i-th test point Pi; Step 34: Calculate the X-coordinate Pix of the i-th point to be measured Pi in the user coordinate system; Step 35: Calculate the Y-coordinate Piy of the i-th point Pi to be measured in the user coordinate system; Step 36: Calculate the Z-coordinate Piz of the i-th point Pi to be measured in the user coordinate system; Step 37: Repeat steps 32 to 36 to complete the coordinate calculation of all points in the set of points to be measured, P. Step 38: Based on the coordinate calculations in steps 32 to 37, obtain the names and corresponding coordinate calculation information of each point Pi in the set of points P to be measured under the user coordinate system in the CAD environment, thus forming the point coordinate data table of the user coordinate system.
[0007] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 34 includes: Step 34-1: Calculate the X-direction distance Dix of the i-th test point Pi in the user coordinate system; Step 34-2: Calculate the X-direction Vix of the i-th point Pi in the user coordinate system; Step 34-3: Calculate the X-coordinate of the i-th test point Pi in the user coordinate system: Pix = Dix * Vix.
[0008] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 35 includes: Step 35-1: Calculate the Y-direction distance Diy of the i-th test point Pi in the user coordinate system; Step 35-2: Calculate the Y-direction Viy of the i-th point Pi in the user coordinate system; Step 35-3: Calculate the Y-coordinate of the i-th test point Pi in the user coordinate system: Piy = Diy * Viy.
[0009] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 36 includes: Step 36-1: Calculate the Z-axis distance Diz of the i-th test point Pi in the user coordinate system; Step 36-2: Calculate the Z-direction Viz of the i-th test point Pi in the user coordinate system; Step 36-3: Calculate the Z-axis coordinate of the i-th test point Pi in the user coordinate system: Piz = Diz * Viz.
[0010] Optionally, in the automatic point coordinate measurement method based on the user coordinate system in a CAD environment as described above, step 34-1 includes: Step 34-1-1: Draw the X-axis reference line DLx of the user coordinate system from the user coordinate system direction control point P1 to the user coordinate system direction control point P2; Step 34-1-2: Establish the normal plane of the X-direction reference line DLx of the user coordinate system through the user coordinate system direction control point P1 as the X-direction measurement reference plane DPx of the user coordinate system; Step 34-1-3: Use the measurement function to measure the distance from the point Pi to be measured to the X-axis measurement reference plane DPx of the user coordinate system, and use it as the X-axis distance Dix of the i-th point Pi in the user coordinate system.
[0011] Optionally, in the automatic point coordinate measurement method based on the user coordinate system in a CAD environment as described above, step 34-2 includes: Step 34-2-1: Project the i-th point Pi to be measured onto the X-axis measurement reference plane DPx of the user coordinate system to establish the projected point Pjix; Step 34-2-2: Draw the X-direction determination line JLx from the projected point Pjix to the point Pi to be measured; Step 34-2-3: Measure the direction vector (DVXx, DVXy, DVXz) of the X-axis reference line DLx in the user coordinate system. Wherein, DVXx is the X-direction vector of the user coordinate system X-direction reference line DLx in the system coordinate system; DVXy is the Y-direction vector of the X-axis reference line DLx in the user coordinate system in the system coordinate system; DVXz is the Z-direction vector of the X-axis reference line DLx in the user coordinate system in the system coordinate system; Step 34-2-4: Measure the direction vector (JVXx, JVXy, JVXz) of the X-direction determination line JLx at the i-th point to be measured. Wherein, JVXx is the X-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; JVXy is the Y-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; JVXz is the Z-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; Step 34-2-5: Determine the relationship between the direction vector (DVXx, DVXy, DVXz) of the X-direction reference line DLx in the user coordinate system and the direction vector (JVXx, JVXy, JVXz) of the X-direction determination line JLx of the i-th test point, and calculate the X-direction direction Vix of the i-th test point Pi in the user coordinate system. Step 34-2-5 includes: Step 34-2-5-1: When (DVXx,DVXy,DVXz) = (JVXx,JVXy,JVXz) in the i-th test point Pi, the X-direction of the i-th test point Pi in the user coordinate system is Vix = 1; Step 34-2-5-2: When (DVXx,DVXy,DVXz) ≠ (JVXx,JVXy,JVXz) in the i-th test point Pi, the X-direction of the i-th test point Pi in the user coordinate system is Vix=-1.
[0012] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 35-1 includes: Step 35-1-1: Draw the Y-axis reference line DLy of the user coordinate system from the user coordinate system direction control point P1 to the user coordinate system direction control point P3; Step 35-1-2: Establish the normal plane of the Y-direction reference line DLy of the user coordinate system through the user coordinate system direction control point P1 as the Y-direction measurement reference plane DPy of the user coordinate system. Step 35-1-3: Measure the distance from the point Pi to be measured to the reference plane DPy in the Y direction of the user coordinate system using the measurement function. This distance is taken as the Y-direction distance Diy of the i-th point Pi in the user coordinate system.
[0013] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 35-2 includes... Step 35-2-1: Project the i-th point Pi to be measured onto the Y-axis measurement reference plane DPy of the user coordinate system to establish the projected point Pjiy; Step 35-2-2: Draw the Y-direction determination line JLy from the projected point Pjiy to the point Pi to be measured; Step 35-2-3: Measure the direction vector (DVYx, DVYy, DVYz) of the Y-axis reference line DLy in the user coordinate system. Wherein, DVYx is the X-direction vector of the Y-direction reference line DLy in the user coordinate system in the system coordinate system; DVYy is the Y-direction vector of the Y-direction reference line DLy in the user coordinate system in the system coordinate system; DVYz is the Z-direction vector of the Y-axis reference line DLy in the user coordinate system in the system coordinate system; Step 35-2-4: Measure the direction vector (JVYx, JVYy, JVYz) of the Y-direction determination line JLy at the i-th test point. Where JVYx is the X-direction vector of the Y-direction determination line JLy of the i-th test point in the system coordinate system; JVYy is the Y-direction vector of the Y-direction determination line JLy at the i-th test point in the system coordinate system. JVYz is the Z-direction vector of the Y-direction determination line JLy of the i-th test point in the system coordinate system; Step 35-2-5: Determine the relationship between the direction vector (DVYx, DVYy, DVYz) of the Y-direction reference line DLy in the user coordinate system and the direction vector (JVYx, JVYy, JVYz) of the Y-direction determination line JLy of the i-th test point, and calculate the Y-direction direction Viy of the i-th test point Pi in the user coordinate system. Step 35-2-5 includes: Step 35-2-5-1: When (DVYx,DVYy,DVYz) = (JVYx,JVYy,JVYz) in the i-th test point Pi, the Y-direction of the i-th test point Pi in the user coordinate system is Viy=1; Step 35-2-5-2: When (DVYx,DVYy,DVYz) ≠ (JVYx,JVYy,JVYz) in the i-th test point Pi, the Y-direction of the i-th test point Pi in the user coordinate system is Viy=-1.
[0014] Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 36-1 includes: Step 36-1-1: Draw the Z-axis reference line DLz of the user coordinate system from the user coordinate system direction control point P1 to the user coordinate system direction control point P4; Step 36-1-2: Establish the normal plane of the Z-direction reference line DLz of the user coordinate system through the user coordinate system direction control point P1 as the Z-direction measurement reference plane DPz of the user coordinate system. Step 36-1-3: Use the measurement function to measure the distance from the point Pi to be measured to the Z-axis measurement reference plane DPz of the user coordinate system, and use it as the Z-axis distance Diz of the i-th point Pi in the user coordinate system; Optionally, in the above-described method for automatic measurement of point coordinates based on a user coordinate system in a CAD environment, step 36-2 includes: Step 36-2-1: Project the i-th point Pi to be measured onto the Z-axis measurement reference plane DPz of the user coordinate system to establish the projected point Pjiz; Step 36-2-2: Draw the Z-direction determination line JLz from the projected point Pjiz to the point Pi to be measured; Step 36-2-3: Measure the direction vector (DVZx, DVZy, DVZz) of the Z-axis reference line DLz in the user coordinate system. Wherein, DVZx is the X-direction vector of the Z-direction reference line DLz in the user coordinate system in the system coordinate system; DVZy is the Y-direction vector of the Z-axis reference line DLz in the user coordinate system in the system coordinate system; DVZz is the Z-direction vector of the user coordinate system's Z-direction reference line DLz in the system coordinate system; Step 36-2-4: Measure the direction vector (JVZx, JVZy, JVZz) of the Z-direction determination line JLz at the i-th test point. Wherein, JVZx is the X-direction vector of the Z-direction determination line JLz of the i-th test point in the system coordinate system; JVZy is the Y-direction vector of the Z-direction determination line JLz of the i-th test point in the system coordinate system; JVZz is the Z-direction vector of the Z-direction determination line JLz at the i-th test point in the system coordinate system. Step 36-2-5: Determine the relationship between the direction vector (DVZx, DVZy, DVZz) of the Z-direction reference line DLz in the user coordinate system and the direction vector (JVZx, JVZy, JVZz) of the Z-direction determination line JLz of the i-th test point, and calculate the Z-direction direction Viz of the i-th test point Pi in the user coordinate system. Step 36-2-5 includes: Step 36-2-5-1: When (DVZx,DVZy,DVZz) = (JVZx,JVZy,JVZz) in the i-th test point Pi, the Z-direction of the i-th test point Pi in the user coordinate system is Viz = 1. Step 36-2-5-2: When (DVZx,DVZy,DVZz) ≠ (JVZx,JVZy,JVZz) in the i-th test point Pi, the Z-direction of the i-th test point Pi in the user coordinate system is Viz=-1.
[0015] The beneficial effects of this invention are as follows: This invention proposes an automatic point coordinate measurement method based on a user coordinate system in a CAD environment. It utilizes software programming to establish a measurement benchmark model in the user coordinate system. By calling measurement functions, it performs measurement and data analysis comparison in the system coordinates, establishing the distance and direction parameters between the points to be measured in the set of points and the X, Y, and Z directions of the user coordinate system. Mathematical calculations are then used to complete the automatic measurement of point coordinates based on the user coordinate system in a CAD environment. By establishing a determination line for the points to be measured and comparing it with the reference direction vector of the user coordinate system, the technical difficulty of determining the vector direction of the points to be measured in the user coordinate system is effectively solved, reducing the software development difficulty. The automatic point coordinate measurement method provided by this invention utilizes software programming to establish a measurement benchmark in CAD software, and data measurement and analysis to achieve distance analysis and direction vector determination of the points to be measured in the set of points based on the reference plane of the user coordinate system. Mathematical calculations are then used to achieve the automatic measurement of point coordinates based on the user coordinate system in a CAD environment.
[0016] The technical solution provided by this invention has wide applicability and is suitable for various application scenarios such as aerospace component docking and assembly, data matching and analysis, robot path planning and precision control. Its ideas are simple and clear and its logic is rigorous, providing a new and effective approach for high-quality and efficient data analysis and design. Attached Figure Description
[0017] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of the present invention and do not constitute a limitation on the technical solutions of the present invention.
[0018] Figure 1 This is the test point model in the embodiment of the present invention.
[0019] Explanation of reference numerals in the attached figures: 1-User coordinate system, 2-Set of points to be measured, 3-Origin of coordinate system, 4-X-axis control point, 5-Y-axis control point, 6-Z-axis control point. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
[0021] The present invention provides the following specific embodiments, which can be combined with each other. For the same or similar concepts or processes, they may not be described again in some embodiments.
[0022] like Figure 1 The image shows a model of the point to be measured in an embodiment of the present invention. The automatic point coordinate measurement method based on a user coordinate system in a CAD environment provided by this embodiment of the present invention includes the following steps: Step 1: Open the model of the point to be measured in the CAD software; Step 2: In the CAD software, select user coordinate system 1 and the set of points to be measured P in the model of the points to be measured; Step 3: By establishing the direction control points under the user coordinate system 1, the coordinates of the points Pi in the set of points to be measured P are calculated under the user coordinate system 1 to obtain the name of each point Pi and the corresponding information of the coordinate calculation, thus completing the automatic measurement of point coordinates based on the user coordinate system 1 in the CAD environment.
[0023] In the above-described method for automatic measurement of point coordinates based on user coordinate system 1 in a CAD environment, step 3 includes: Step 31: Establish four points P1, P2, P3, and P4 in user coordinate system 1 as directional control points of user coordinate system 1; where P1, P2, P3, and P4 are the origin of user coordinate system 1, X-axis control point 4, Y-axis control point, and Z-axis control point, respectively, and each axis control point is any point on the corresponding axis; like Figure 1 As shown, in this embodiment, the coordinate values of the origin 3, X-axis control point 4, Y-axis control point 5, and Z-axis control point 6 of the user coordinate system 1 are as follows: P1=(120,150,240); P2=(123.4810, 112.5344, 272.9274); P3=(164.3525, 137.2240,220.7743); P4=(142.8196, 180.5467,272.3445); Step 32: Using the user-selected set of test points P, select the i-th test point Pi in the set of test points P; Where i is a loop variable, with an initial value of 1 and a value range of (1, n), and n is the total number of test points in the test point set P; In this embodiment, the user selects the set of test points 2, and the coordinate data is shown in Table 1. The i=1th test point in the set of test points P is selected as Pi = (170.324, 269.820, 467.371). Where i is the loop variable, with an initial value of 1 and a value range of (1, n) = (1, 4); n is the total number of test points in the test point set P, which is 4. Table 1. Location information of the user-selected set of points P in the system coordinate system.
[0024] Step 33: Read the name of the i=1th test point Pi, Pin="point.21"; Step 34: Calculate the X-coordinate Pix of the i=1th test point Pi in user coordinate system 1; In the automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment as described above, step 34 includes: Step 34-1: Calculate the X-direction distance Dix of the i-th test point Pi=1 in user coordinate system 1; In the automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment as described above, step 34-1 includes: Step 34-1-1: Draw the X-direction reference line DLx of the user coordinate system from the control point P1 in the user coordinate system 1 to the control point P2 in the user coordinate system 1. Step 34-1-2: Establish the normal plane of the X-direction reference line DLx of the user coordinate system through the control point P1 of the user coordinate system 1 as the X-direction measurement reference plane DPx of the user coordinate system. Step 34-1-3: Measure the distance from the point Pi to be measured to the X-axis measurement reference plane DPx of the user coordinate system using the measurement function. This distance is taken as the X-axis distance Dix = 63.455 of the i-th point Pi in the user coordinate system 1. Step 34-2: Calculate the X-direction Vix of the i-th point Pi=1 in user coordinate system 1; In the above-described automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment, step 34-2 includes: Step 34-2-1: Project the i-th measurement point Pi onto the X-axis measurement reference plane DPx of the user coordinate system to establish the projected point Pjix = (165.906, 317.368, 425.583); Step 34-2-2: Draw the X-direction determination line JLx from the projected point Pjix to the point Pi to be measured; Step 34-2-3: Measure the direction vector (DVXx, DVXy, DVXz) of the X-axis reference line DLx in the user coordinate system = (0.069619, -0.749312, 0.658547). Wherein, DVXx is the X-direction vector of the user coordinate system X-direction reference line DLx in the system coordinate system; DVXy is the Y-direction vector of the X-axis reference line DLx in the user coordinate system in the system coordinate system; DVXz is the Z-direction vector of the X-axis reference line DLx in the user coordinate system in the system coordinate system; Step 34-2-4: Measure the direction vector (JVXx, JVXy, JVXz) of the X-direction determination line JLx at the i-th test point = (0.069619, -0.749312, 0.658547); Wherein, JVXx is the X-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; JVXy is the Y-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; JVXz is the Z-direction vector of the X-direction determination line JLx of the i-th test point in the system coordinate system; Step 34-2-5: Determine the relationship between the direction vector (DVXx, DVXy, DVXz) of the X-direction reference line DLx in the user coordinate system and the direction vector (JVXx, JVXy, JVXz) of the X-direction determination line JLx of the i-th test point, and calculate the X-direction direction Vix of the i-th test point Pi in the user coordinate system 1. Step 34-2-5 includes: Step 34-2-5-1: When (DVXx,DVXy,DVXz) = (JVXx,JVXy,JVXz) in the i-th test point Pi, the X-direction of the i-th test point Pi in the user coordinate system 1 is Vix = 1; Step 34-3: Calculate the X-coordinate of the i-th test point Pi=1 in user coordinate system 1: Pix=Dix*Vix=63.455*1=63.455.
[0025] Step 35: Calculate the Y-coordinate Piy of the i=1th test point Pi in user coordinate system 1; In the above-described automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment, step 35 includes: Step 35-1: Calculate the Y-direction distance Diy of the i-th test point Pi in user coordinate system 1; In the above-described method for automatic measurement of point coordinates based on user coordinate system 1 in a CAD environment, step 35-1 includes: Step 35-1-1: Draw the reference line DLy in the Y direction of the user coordinate system from the control point P1 in the direction of user coordinate system 1 to the control point P3 in the direction of user coordinate system 1. Step 35-1-2: Establish the normal plane of the Y-direction reference line DLy of the user coordinate system through the control point P1 in the user coordinate system 1, and use it as the Y-direction measurement reference plane DPy of the user coordinate system. Step 35-1-3: Measure the distance from the point Pi to be measured to the reference plane DPy in the Y direction of the user coordinate system using the measurement function. This distance is taken as the Y-direction distance Diy = 73.404 of the i-th point Pi in the user coordinate system 1.
[0026] Step 35-2: Calculate the Y-direction Viy of the i-th point Pi in user coordinate system 1; In the above-described automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment, step 35-2 includes... Step 35-2-1: Project the i-th measurement point Pi onto the Y-axis measurement reference plane DPy of the user coordinate system to establish the projected point Pjiy = (235.437, 251.064, 439.146); Step 35-2-2: Draw the Y-direction determination line JLy from the projected point Pjiy to the point Pi to be measured; Step 35-2-3: Measure the direction vector (DVYx, DVYy, DVYz) of the Y-axis reference line DLy in the user coordinate system = (0.887051, -0.25552, -0.384513); Wherein, DVYx is the X-direction vector of the Y-direction reference line DLy in the user coordinate system in the system coordinate system; DVYy is the Y-direction vector of the Y-direction reference line DLy in the user coordinate system in the system coordinate system; DVYz is the Z-direction vector of the Y-axis reference line DLy in the user coordinate system in the system coordinate system; Step 35-2-4: Measure the direction vector (JVYx, JVYy, JVYz) of the Y-direction determination line JLy at the i-th test point = (-0.887051, 0.25552, 0.384513); Where JVYx is the X-direction vector of the Y-direction determination line JLy of the i-th test point in the system coordinate system; JVYy is the Y-direction vector of the Y-direction determination line JLy at the i-th test point in the system coordinate system. JVYz is the Z-direction vector of the Y-direction determination line JLy of the i-th test point in the system coordinate system; Step 35-2-5: Determine the relationship between the direction vector (DVYx, DVYy, DVYz) of the Y-direction reference line DLy in the user coordinate system and the direction vector (JVYx, JVYy, JVYz) of the Y-direction determination line JLy of the i-th test point, and calculate the Y-direction Viy of the i-th test point Pi in the user coordinate system 1. Step 35-2-5 includes: Step 35-2-5-2: When (DVYx,DVYy,DVYz) ≠ (JVYx,JVYy,JVYz) in the i-th test point Pi, the Y-direction of the i-th test point Pi in the user coordinate system 1 is Viy=-1.
[0027] Step 35-3: Calculate the Y-coordinate of the i-th test point Pi in the user coordinate system 1: Piy = Diy * Viy = 73.404 * (-1) = -73.404.
[0028] Step 36: Calculate the Z-coordinate Piz of the i=1th test point Pi in user coordinate system 1; In the above-described method for automatic measurement of point coordinates based on user coordinate system 1 in a CAD environment, step 36 includes: Step 36-1: Calculate the Z-direction distance Diz of the i-th test point Pi in user coordinate system 1; In the automatic point coordinate measurement method based on user coordinate system 1 in a CAD environment as described above, step 36-1 includes: Step 36-1-1: Draw the Z-axis reference line DLz of the user coordinate system from the control point P1 in the user coordinate system 1 direction to the control point P4 in the user coordinate system 1 direction. Step 36-1-2: Establish the normal plane of the reference line DLz in the Z direction of the user coordinate system through the control point P1 in the user coordinate system 1 as the measurement reference plane DPz in the Z direction of the user coordinate system. Step 36-1-3: Measure the distance from the point Pi to be measured to the measurement reference plane DPz in the Z direction of the user coordinate system using the measurement function. This distance is taken as the Z-direction distance Diz = 243.254 of the i-th point Pi in the user coordinate system 1. Step 36-2: Calculate the Z-direction Viz of the i-th point Pi in user coordinate system 1; In the above-described method for automatic measurement of point coordinates based on user coordinate system 1 in a CAD environment, step 36-2 includes: Step 36-2-1: Project the i-th point Pi to be measured onto the Z-axis measurement reference plane DPz of the user coordinate system to establish the projected point Pjiz; = (59.304, 121.208, 310.013); Step 36-2-2: Draw the Z-direction determination line JLz from the projected point Pjiz to the point Pi to be measured; Step 36-2-3: Measure the direction vector (DVZx, DVZy, DVZz) of the Z-axis reference line DLz in the user coordinate system = (0.456392, 0.610934, 0.646889); Wherein, DVZx is the X-direction vector of the Z-direction reference line DLz in the user coordinate system in the system coordinate system; DVZy is the Y-direction vector of the Z-axis reference line DLz in the user coordinate system in the system coordinate system; DVZz is the Z-direction vector of the user coordinate system's Z-direction reference line DLz in the system coordinate system; Step 36-2-4: Measure the direction vector (JVZx, JVZy, JVZz) of the Z-direction determination line JLz at the i-th test point = (0.456392, 0.610934, 0.646889); Wherein, JVZx is the X-direction vector of the Z-direction determination line JLz of the i-th test point in the system coordinate system; JVZy is the Y-direction vector of the Z-direction determination line JLz of the i-th test point in the system coordinate system; JVZz is the Z-direction vector of the Z-direction determination line JLz at the i-th test point in the system coordinate system. Step 36-2-5: Determine the relationship between the direction vector (DVZx, DVZy, DVZz) of the reference line DLz in the Z direction of the user coordinate system and the direction vector (JVZx, JVZy, JVZz) of the determination line JLz in the Z direction of the i-th test point, and calculate the Z-direction Viz of the i-th test point Pi in the user coordinate system 1. Step 36-2-5 includes: Step 36-2-5-1: When (DVZx,DVZy,DVZz) = (JVZx,JVZy,JVZz) in the i-th test point Pi, the Z-direction of the i-th test point Pi in the user coordinate system 1 is Viz = 1. Step 36-3: Calculate the Z-coordinate of the i-th test point Pi in the user coordinate system 1: Piz = Diz * Viz = 243.254 * 1 = 243.254.
[0029] Step 37: Repeat steps 32 to 36 to complete the coordinate calculation of all points in the set of points to be measured, P; Step 38: Based on the coordinate calculations in steps 32 to 37, obtain the names and corresponding coordinate calculation information of each point Pi in the set of points to be measured under the user coordinate system 1 in the CAD environment, thus forming the point coordinate data table 2 of the user coordinate system 1.
[0030] Table 2. Coordinates of the points to be measured in the user coordinate system
[0031] This invention proposes an automatic point coordinate measurement method based on a user coordinate system in a CAD environment. It utilizes software programming to establish a measurement benchmark model in the user coordinate system. By calling measurement functions, it performs measurements and data analysis comparisons in the system coordinates, establishing the distance and direction parameters between the points in the measurement set and the X, Y, and Z directions of the user coordinate system. Mathematical calculations are then used to complete the automatic measurement of point coordinates based on the user coordinate system in a CAD environment. By establishing a determination line at the measurement point and comparing it with the reference direction vector of the user coordinate system, the technical challenge of determining the vector direction of the measurement point in the user coordinate system is effectively solved, reducing the software development difficulty. The automatic point coordinate measurement method provided by this invention utilizes software programming to establish a measurement benchmark in CAD software, performs data measurement and analysis to achieve distance analysis and direction vector determination of the points in the measurement set based on the reference plane of the user coordinate system, and realizes automatic measurement of point coordinates based on the user coordinate system in a CAD environment through mathematical calculations.
[0032] The technical solution provided by this invention has wide applicability and is suitable for various application scenarios such as aerospace component docking and assembly, data matching and analysis, robot path planning and precision control. Its ideas are simple and clear and its logic is rigorous, providing a new and effective approach for high-quality and efficient data analysis and design.
[0033] While the embodiments disclosed in this invention are as described above, they are merely illustrative of the embodiments to facilitate understanding of the invention and are not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and variations in the form and details of the implementation without departing from the spirit and scope disclosed herein; however, the scope of patent protection for this invention shall still be determined by the scope defined in the appended claims.
Claims
1. A method for automatically measuring coordinates of points based on a user coordinate system in a CAD environment, characterized in that, The application relates to a method for automatically measuring point coordinates in a CAD environment based on a user coordinate system. The method comprises the following steps: Step 1: opening a point model to be measured in CAD software; Step 2: selecting a user coordinate system and a point set P to be measured in the point model to be measured in the CAD software; 2. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 1, characterized in that, Step 3: establishing a direction control point in the user coordinate system, and calculating the coordinates of the point Pi in the point set P to be measured in the user coordinate system to obtain the corresponding information of the name and coordinate calculation of each point Pi in the point set P to be measured in the user coordinate system, thereby completing the automatic measurement of the point coordinates in the CAD environment based on the user coordinate system. The step 3 comprises the following steps: Step 31: establishing four points P1, P2, P3 and P4 as the direction control points of the user coordinate system in the user coordinate system; wherein the four points P1, P2, P3 and P4 are respectively the origin point, the X-axis control point, the Y-axis control point and the Z-axis control point of the user coordinate system; Step 32: selecting the ith point Pi in the point set P to be measured by the user; wherein i is a loop variable, the initial value is 1, the value range is (1, n), and n is the total number of points to be measured in the point set P to be measured; Step 33: reading the name Pin of the ith point Pi to be measured; Step 34: calculating the X-direction coordinate Pix of the ith point Pi to be measured in the user coordinate system; Step 35: calculating the Y-direction coordinate Piy of the ith point Pi to be measured in the user coordinate system; Step 36: calculating the Z-direction coordinate Piz of the ith point Pi to be measured in the user coordinate system; Step 37: repeating steps 32 to 36 to complete the coordinate calculation of all points to be measured in the point set P to be measured; 3. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 2, characterized in that, Step 38: based on the coordinate calculation of steps 32 to 37, the corresponding information of the name and coordinate calculation of each point Pi in the point set P to be measured in the user coordinate system in the CAD environment is obtained, thereby forming the point coordinate data table of the user coordinate system. The step 34 comprises the following steps: Step 34-1: calculating the X-direction distance Dix of the ith point Pi to be measured in the user coordinate system; Step 34-2: calculating the X-direction direction Vix of the ith point Pi to be measured in the user coordinate system; 4. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 2, characterized in that, Step 34-3: calculating the X-direction coordinate Pix of the ith point Pi to be measured in the user coordinate system, Pix=Dix*Vix. The step 35 comprises the following steps: Step 35-1: calculating the Y-direction distance Diy of the ith point Pi to be measured in the user coordinate system; Step 35-2: calculating the Y-direction direction Viy of the ith point Pi to be measured in the user coordinate system; 5. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 2, characterized in that, Step 35-3: calculating the Y-direction coordinate Piy of the ith point Pi to be measured in the user coordinate system, Piy=Diy*Viy. The step 36 comprises the following steps: Step 36-1: calculating the Z-direction distance Diz of the ith point Pi to be measured in the user coordinate system; Step 36-2: calculating the Z-direction direction Viz of the ith point Pi to be measured in the user coordinate system; 6. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 3, characterized in that, Step 36-3: calculating the Z-direction coordinate Piz of the ith point Pi to be measured in the user coordinate system, Piz=Diz*Viz. The step 34-1 comprises the following steps: Step 34-1-1: drawing a reference straight line DLx in the X-direction of the user coordinate system from the direction control point P1 of the user coordinate system to the direction control point P2 of the user coordinate system. Step 34-1-2, establish the normal plane of the user coordinate system X-direction reference straight line DLx as the user coordinate system X-direction measurement reference plane Dpx by the user coordinate system direction control point P1; Step 34-1-3, measure the distance from the to-be-measured point Pi to the user coordinate system X-direction measurement reference plane Dpx as the X-direction distance Dix of the i-th to-be-measured point Pi in the user coordinate system by using the measurement function.
7. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 3, characterized in that, The step 34-2 includes: Step 34-2-1, establish the normally-projected point Pjix on the user coordinate system X-direction measurement reference plane Dpx by the i-th to-be-measured point Pi; Step 34-2-2, draw the to-be-measured point X-direction judgment straight line JLx from the normally-projected point Pjix to the to-be-measured point Pi; Step 34-2-3, measure the direction vector (DVXx, DVXy, DVXz) of the user coordinate system X-direction reference straight line DLx; Wherein, DVXx is the X-direction direction vector of the user coordinate system X-direction reference straight line DLx in the system coordinate system; DVXy is the Y-direction direction vector of the user coordinate system X-direction reference straight line DLx in the system coordinate system; DVXz is the Z-direction direction vector of the user coordinate system X-direction reference straight line DLx in the system coordinate system; Step 34-2-4, measure the direction vector (JVXx, JVXy, JVXz) of the i-th to-be-measured point X-direction judgment straight line JLx; Wherein, JVXx is the X-direction direction vector of the i-th to-be-measured point X-direction judgment straight line JLx in the system coordinate system; JVXy is the Y-direction direction vector of the i-th to-be-measured point X-direction judgment straight line JLx in the system coordinate system; JVXz is the Z-direction direction vector of the i-th to-be-measured point X-direction judgment straight line JLx in the system coordinate system; Step 34-2-5, determine the relationship between the direction vector (DVXx, DVXy, DVXz) of the user coordinate system X-direction reference straight line DLx and the direction vector (JVXx, JVXy, JVXz) of the i-th to-be-measured point X-direction judgment straight line JLx, and calculate the X-direction direction Vix of the i-th to-be-measured point Pi in the user coordinate system; Wherein, the step 34-2-5 includes: Step 34-2-5-1, when (DVXx, DVXy, DVXz) = (JVXx, JVXy, JVXz) in the i-th to-be-measured point Pi, the X-direction direction of the i-th to-be-measured point Pi in the user coordinate system is Vix=1; Step 34-2-5-2, when (DVXx, DVXy, DVXz) ≠ (JVXx, JVXy, JVXz) in the i-th to-be-measured point Pi, the X-direction direction of the i-th to-be-measured point Pi in the user coordinate system is Vix=-1.
8. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 4, characterized in that, The step 35-1 includes: Step 35-1-1, draw the user coordinate system Y-direction reference straight line DLy from the user coordinate system direction control point P1 to the user coordinate system direction control point P3; Step 35-1-2, establish the normal plane of the user coordinate system Y-direction reference straight line DLy as the user coordinate system Y-direction measurement reference plane Dpy by the user coordinate system direction control point P1; Step 35-1-3, measuring the distance from the point Pi to the Y-direction measurement reference plane DPy of the user coordinate system by using the measurement function as the Y-direction distance Diy of the ith point Pi in the user coordinate system.
9. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 4, characterized in that, The step 35-2 includes Step 35-2-1, normal projection of the ith point Pi on the Y-direction measurement reference plane DPy of the user coordinate system to establish the projected point Pjiy; Step 35-2-2, drawing the Y-direction judgment straight line JLy of the point Pi from the projected point Pjiy; Step 35-2-3, measuring the direction vector (DVYx, DVYy, DVYz) of the Y-direction reference straight line DLy of the user coordinate system; Wherein, DVYx is the X-direction direction vector of the Y-direction reference straight line DLy of the user coordinate system in the system coordinate system; DVYy is the Y-direction direction vector of the Y-direction reference straight line DLy of the user coordinate system in the system coordinate system; DVYz is the Z-direction direction vector of the Y-direction reference straight line DLy of the user coordinate system in the system coordinate system; Step 35-2-4, measuring the direction vector (JVYx, JVYy, JVYz) of the Y-direction judgment straight line JLy of the ith point; Wherein, JVYx is the X-direction direction vector of the Y-direction judgment straight line JLy of the ith point in the system coordinate system; JVYy is the Y-direction direction vector of the Y-direction judgment straight line JLy of the ith point in the system coordinate system; JVYz is the Z-direction direction vector of the Y-direction judgment straight line JLy of the ith point in the system coordinate system; Step 35-2-5, determining the relationship between the direction vector (DVYx, DVYy, DVYz) of the Y-direction reference straight line DLy of the user coordinate system and the direction vector (JVYx, JVYy, JVYz) of the Y-direction judgment straight line JLy of the ith point, and calculating the Y-direction Viy of the ith point Pi in the user coordinate system. Wherein, the step 35-2-5 includes: Step 35-2-5-1, when (DVYx, DVYy, DVYz)=(JVYx, JVYy, JVYz) in the ith point Pi, the Y-direction of the ith point Pi in the user coordinate system is Viy=1; Step 35-2-5-2, when (DVYx, DVYy, DVYz)≠(JVYx, JVYy, JVYz) in the ith point Pi, the Y-direction of the ith point Pi in the user coordinate system is Viy=-1.
10. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 5, characterized in that, The step 36-1 includes: Step 36-1-1, drawing the Z-direction reference straight line DLz of the user coordinate system from the direction control point P1 of the user coordinate system to the direction control point P4 of the user coordinate system; Step 36-1-2, establishing the normal plane of the Z-direction reference straight line DLz of the user coordinate system as the Z-direction measurement reference plane DPz of the user coordinate system through the direction control point P1 of the user coordinate system; Step 36-1-3, measuring the distance from the point Pi to the Z-direction measurement reference plane DPz of the user coordinate system by using the measurement function as the Z-direction distance Diz of the ith point Pi in the user coordinate system.
11. The method for automatic measurement of point coordinates based on user coordinate system in CAD environment according to claim 5, characterized in that, The step 36-2 includes: Step 36-2-1, project the i-th point to be measured Pi on the measurement reference plane DPz of the user coordinate system Z to establish a projected point Pjiz; Step 36-2-2, draw a Z-direction judgment line JLz from the projected point Pjiz to the point to be measured Pi; Step 36-2-3, measure the direction vector (DVZx, DVZy, DVZz) of the Z-direction reference line DLz of the user coordinate system; Wherein, DVZx is the X-direction vector of the Z-direction reference line DLz of the user coordinate system in the system coordinate system; DVZy is the Y-direction vector of the Z-direction reference line DLz of the user coordinate system in the system coordinate system; DVZz is the Z-direction vector of the Z-direction reference line DLz of the user coordinate system in the system coordinate system; Step 36-2-4, measure the direction vector (JVZx, JVZy, JVZz) of the Z-direction judgment line JLz of the i-th point to be measured; Wherein, JVZx is the X-direction vector of the Z-direction judgment line JLz of the i-th point to be measured in the system coordinate system; JVZy is the Y-direction vector of the Z-direction judgment line JLz of the i-th point to be measured in the system coordinate system; JVZz is the Z-direction vector of the Z-direction judgment line JLz of the i-th point to be measured in the system coordinate system; Step 36-2-5, determine the relationship between the direction vector (DVZx, DVZy, DVZz) of the Z-direction reference line DLz of the user coordinate system and the direction vector (JVZx, JVZy, JVZz) of the Z-direction judgment line JLz of the i-th point to be measured, and calculate the Z-direction Viz of the i-th point to be measured Pi in the user coordinate system; Wherein, the step 36-2-5 includes: Step 36-2-5-1, when (DVZx, DVZy, DVZz) = (JVZx, JVZy, JVZz) in the i-th point to be measured Pi, the Z-direction of the i-th point to be measured Pi in the user coordinate system is Viz=1; Step 36-2-5-2, when (DVZx, DVZy, DVZz) ≠ (JVZx, JVZy, JVZz) in the i-th point to be measured Pi, the Z-direction of the i-th point to be measured Pi in the user coordinate system is Viz=-1.