CN114800965A - Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon - Google Patents
Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon Download PDFInfo
- Publication number
- CN114800965A CN114800965A CN202210388311.4A CN202210388311A CN114800965A CN 114800965 A CN114800965 A CN 114800965A CN 202210388311 A CN202210388311 A CN 202210388311A CN 114800965 A CN114800965 A CN 114800965A
- Authority
- CN
- China
- Prior art keywords
- point
- vector
- polygon
- edge
- adjacent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 239000013598 vector Substances 0.000 claims abstract description 104
- 238000004364 calculation method Methods 0.000 claims abstract description 18
- 239000000203 mixture Substances 0.000 claims abstract description 12
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 4
- 230000003447 ipsilateral effect Effects 0.000 claims 1
- 230000008439 repair process Effects 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 6
- 239000000243 solution Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B29—WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
- B29C—SHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
- B29C33/00—Moulds or cores; Details thereof or accessories therefor
- B29C33/38—Moulds or cores; Details thereof or accessories therefor characterised by the material or the manufacturing process
- B29C33/3842—Manufacturing moulds, e.g. shaping the mould surface by machining
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B29—WORKING OF PLASTICS; WORKING OF SUBSTANCES IN A PLASTIC STATE IN GENERAL
- B29C—SHAPING OR JOINING OF PLASTICS; SHAPING OF MATERIAL IN A PLASTIC STATE, NOT OTHERWISE PROVIDED FOR; AFTER-TREATMENT OF THE SHAPED PRODUCTS, e.g. REPAIRING
- B29C45/00—Injection moulding, i.e. forcing the required volume of moulding material through a nozzle into a closed mould; Apparatus therefor
- B29C45/17—Component parts, details or accessories; Auxiliary operations
- B29C45/26—Moulds
Landscapes
- Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Mechanical Engineering (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种自动计算空间多边形同侧邻接区域面的方法,属于面区域计算技术领域。其包括以下步骤:(1)对空间多边形的边进行几何排序,确定多边形的方向;(2)构建边的方向矢量,构建边两侧邻接面的方位矢量;(3)计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位。本发明通过三矢量混合积判别面位于边的哪一侧,实现根据孔洞的封闭边界,自动计算识别孔洞边界的区域面,进而解决模具分型时孔洞的自动修补问题。
The invention discloses a method for automatically calculating an adjacent area surface on the same side of a spatial polygon, and belongs to the technical field of surface area calculation. It includes the following steps: (1) geometrically sort the edges of the spatial polygon to determine the direction of the polygon; (2) construct the direction vector of the edge, and construct the orientation vector of the adjacent surfaces on both sides of the edge; (3) calculate the edge direction vector and the two The three-vector mixture product of the azimuth vectors of the adjacent surfaces, and the orientation of the two adjacent surfaces is judged according to the relationship between the three-vector mixture product and zero. The invention determines which side of the edge the surface is located on by the three-vector mixed product, realizes automatic calculation and identification of the area surface of the hole boundary according to the closed boundary of the hole, and solves the problem of automatic repair of the hole during mold parting.
Description
技术领域technical field
本发明涉及面区域计算技术领域,具体是一种自动计算空间多边形同侧邻接区域面的方法、装置。The invention relates to the technical field of surface area calculation, in particular to a method and a device for automatically calculating the adjacent area surfaces on the same side of a spatial polygon.
背景技术Background technique
面区域的计算在特征识别、模具分型、CAM编程等方面均有应用。一般是按照某些规则,如按面的可见性、按边界等方法,将面区域划分为不同的连续区域,其中以封闭边界划分区域应用较多。如图1,对于正则几何形体,每条边有且仅有两个邻接面。显然,若指定边的方向,则一个邻接面在边的左侧,另一个在边的右侧。在工程中,两侧面区域有时具有不同的意义,如模具分型中,若将分型线左侧面区域定义为型腔区域,则右侧面一定是型芯区域。因此,判断邻接面位于边的哪一侧具有重要的价值。The calculation of the surface area has applications in feature recognition, mold parting, CAM programming, etc. Generally, the surface area is divided into different continuous areas according to certain rules, such as by the visibility of the surface, by the boundary, etc., among which the area divided by the closed boundary is used more. As shown in Figure 1, for regular geometry, each edge has one and only two adjacent faces. Obviously, if the direction of the edge is specified, one adjoining face is to the left of the edge and the other is to the right of the edge. In engineering, the two side areas sometimes have different meanings. For example, in mold parting, if the left side area of the parting line is defined as the cavity area, the right side must be the core area. Therefore, it is of great value to determine which side of the edge the adjoining face is located on.
在注塑模具设计过程中,分型设计是第一步,其结果对模具结构有重要影响。分型的工作之一就是补孔,在模具分型之前必须完成产品模型上所有孔洞的修补。孔洞是产品三维模型中常见结构,主要为了满足产品的工艺需求。对于简单孔,现有的CAD软件已经能够自动修补,但大量复杂孔洞的修补工作仍然依赖于人工,据实践经验,复杂孔洞修补花费时间约占分型的80%左右,是影响模具设计效率的关键因素。而开口型孔洞的自动修补中,关键问题是空间多边形同侧邻接面的自动判别。In the process of injection mold design, parting design is the first step, and the result has an important influence on the mold structure. One of the parting work is to fill holes. Before the mold parting, all the holes on the product model must be repaired. The hole is a common structure in the 3D model of the product, mainly to meet the technological requirements of the product. For simple holes, the existing CAD software has been able to automatically repair, but the repair work of a large number of complex holes still relies on manual labor. According to practical experience, the repairing time of complex holes accounts for about 80% of the parting time, which affects the efficiency of mold design. The key factor. In the automatic repair of open holes, the key problem is the automatic identification of the adjacent surfaces on the same side of the spatial polygon.
在SIEMENS NX软件中,针对开口型的孔洞,可以使用“修补开口”工具实现。使用“修补开口”时,需要两个步骤:In SIEMENS NX software, for open holes, you can use the "Repair Opening" tool to achieve. When using Patch Openings, two steps are required:
(1)选择孔洞边界的参考面(实际上是边界同侧的区域面);(1) Select the reference surface of the hole boundary (actually the area surface on the same side of the boundary);
(2)选择孔洞的封闭边界。(2) Select the closed boundary of the hole.
上述两个步骤都需要手工完成。在模具分型自动修补孔洞中,分型工具会自动搜索到孔洞边界,也就是上述第(2)步。但针对这类孔洞,分型工作无法找到匹配的修补方法。因此,需要开发自动修补工具实现该类孔洞的自动修补。但其中关键问题是,根据孔洞的封闭边界,解决上述步骤(1)中区域面的自动计算。Both of the above steps need to be done manually. In the mold parting automatic repair hole, the parting tool will automatically search for the hole boundary, which is the above step (2). But for these kinds of holes, the typing work has not been able to find a matching repair method. Therefore, it is necessary to develop an automatic repair tool to realize the automatic repair of such holes. But the key problem is to solve the automatic calculation of the area surface in the above step (1) according to the closed boundary of the hole.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明针对现有技术的不足,提供的一种自动计算空间多边形同侧邻接区域面的方法,能够快速、准确计算空间多边形同侧邻接面区域。In view of this, the present invention aims at the deficiencies of the prior art, and provides a method for automatically calculating the same-side adjacent area surface of a spatial polygon, which can quickly and accurately calculate the same-side adjacent surface area of a spatial polygon.
为解决上述技术问题,本发明所采取的技术方案是:In order to solve the above-mentioned technical problems, the technical scheme adopted by the present invention is:
提供一种自动计算空间多边形同侧邻接区域面的方法,包括以下步骤:Provided is a method for automatically calculating the same-side adjacent area surface of a spatial polygon, comprising the following steps:
步骤(1):对空间多边形的边进行几何排序,确定多边形的方向;Step (1): geometrically sort the edges of the spatial polygon to determine the direction of the polygon;
步骤(2):构建边的方向矢量,构建边两侧邻接面的方位矢量;Step (2): construct the direction vector of the edge, and construct the azimuth vector of the adjacent surfaces on both sides of the edge;
步骤(3):计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位。Step (3): Calculate the three-vector mixture product of the edge direction vector and the orientation vectors of the two adjacent surfaces, and judge the orientation of the two adjacent surfaces according to the relationship between the three-vector mixture product and zero.
进一步地,步骤(1)中,在排序过程中,以第一条边的起点指向终点方向作为多边形的方向,并作为后续边的方向基准,依次搜索确定多边形的方向,方法如下:Further, in step (1), in the sorting process, take the starting point of the first side to the end point as the direction of the polygon, and use it as the direction reference of the subsequent sides, and sequentially search to determine the direction of the polygon, the method is as follows:
S1:从任意一条边出发,找到两个端点,将第一个端点定义为起点,第二个端点定义为终点,将起点设定为多边形起点,将终点设定为当前点;S1: Starting from any edge, find two endpoints, define the first endpoint as the starting point, the second endpoint as the ending point, set the starting point as the polygon starting point, and set the ending point as the current point;
S2:若剩余边为空,转到S4,否则,以当前点为目标,找到剩余边中端点与当前点重合的边;S2: If the remaining side is empty, go to S4, otherwise, take the current point as the target, and find the side whose endpoint in the remaining side coincides with the current point;
S3:以重合点为该边起点,另一端点为终点,更新当前点为该终点,剩余边减1,转到S2;S3: Take the coincident point as the starting point of the edge, and the other end point as the end point, update the current point as the end point, subtract 1 from the remaining side, and go to S2;
S4:若多边形起点与当前点重合,多边形封闭,否则不封闭。S4: If the starting point of the polygon coincides with the current point, the polygon is closed, otherwise it is not closed.
进一步地,步骤(2)中,对任意类型边进行离散,取边的起点和中点,由起点指向中点的方向构建方向矢量。Further, in step (2), any type of edge is discretized, the starting point and the midpoint of the edge are taken, and a direction vector is constructed from the direction from the starting point to the midpoint.
进一步地,步骤(2)中,在构造邻接面方位矢量时,取边上一点指向邻接面上特征点作为方位矢量。Further, in step (2), when constructing the azimuth vector of the adjoining surface, take a point on the edge pointing to the feature point on the adjoining surface as the azimuth vector.
进一步地,取边的中点作为起点。Further, take the midpoint of the edge as the starting point.
进一步地,在邻接面上取点的方法为:以边的中点和边的方向矢量构建基准平面,求基准平面和邻接面的交线,当基准平面和邻接面有且只有一条交线时,取交线的中点。Further, the method of taking points on the adjacent surface is: construct the reference plane with the midpoint of the edge and the direction vector of the edge, and find the intersection line between the reference plane and the adjacent surface. When the reference plane and the adjacent surface have one and only one intersection line , take the midpoint of the intersection.
进一步地,步骤(3)中,边edge的两个邻接面分别为face1和face2,vecFwd为边的方向矢量;Further, in step (3), the two adjacent faces of the edge are face1 and face2 respectively, and vecFwd is the direction vector of the edge;
构造邻接面方位矢量vF1、vF2,分别为边上同一点到face1的点pnt1、face2上一点pnt2的方向矢量;Construct the adjacent face orientation vectors vF1 and vF2, which are the direction vectors from the same point on the edge to the point pnt1 of face1 and the point pnt2 on face2;
三个矢量的数学关系如下:The mathematical relationship of the three vectors is as follows:
(vF1×vF2)·vecFwd≤0 (1)(vF 1 ×vF 2 )·vecFwd≤0 (1)
(vF1×vF2)·vecFwd>0 (2)(vF 1 ×vF 2 )·vecFwd>0 (2)
若三个矢量满足式(1),vF1×vF2的矢量方向与vecFwd夹角大于在90°~180°,两者方向基本相反,则可判定face1为左侧面,face2为右侧面;If the three vectors satisfy formula (1), the angle between the vector direction of vF1×vF2 and vecFwd is greater than 90°~180°, and the two directions are basically opposite, it can be determined that face1 is the left side and face2 is the right side;
若三个矢量满足式(2),vF1×vF2的矢量方向与vecFwd夹角在0°~90°之间,两者方向基本一致,则face1为右侧面,face2为左侧面。If the three vectors satisfy formula (2), the vector direction of vF1×vF2 and the angle between vecFwd and vecFwd are between 0° and 90°, and the two directions are basically the same, then face1 is the right side and face2 is the left side.
提供一种自动计算空间多边形同侧邻接区域面的装置,包括:Provided is a device for automatically calculating the adjacent area surfaces on the same side of a spatial polygon, including:
排序模块,用于对空间多边形的边进行几何排序;Sorting module for geometrically sorting the edges of spatial polygons;
构建模块,用于构建边的方向矢量,以及构建边两侧邻接面的方位矢量;The building block is used to construct the direction vector of the edge and the azimuth vector of the adjacent faces on both sides of the edge;
计算判断模块,用于计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位。The calculation and judgment module is used to calculate the three-vector mixture product of the edge direction vector and the orientation vector of the two adjacent surfaces, and judge the orientation of the two adjacent surfaces according to the relationship between the three-vector mixture product and zero.
提供一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现如权利要求1-7中任一所述的自动计算空间多边形同侧邻接区域面的方法。A computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, implements the method for automatically calculating the same-side adjacent area surface of a spatial polygon according to any one of claims 1-7.
提供一种计算机设备,包括处理器和存储器,所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以实现如权利要求1-7中任一所述的自动计算空间多边形同侧邻接区域面的方法。A computer device is provided, comprising a processor and a memory, the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to realize the execution of claims 1-7 A method for automatically calculating the same-side adjacent area surface of a spatial polygon as described in any one of.
与现有技术相比,本发明的有益效果如下:Compared with the prior art, the beneficial effects of the present invention are as follows:
本发明通过对空间多边形的边进行几何排序,确定多边形的方向,构建边的方向矢量,以及边两侧邻接面的方位矢量,计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位,从而实现根据孔洞的封闭边界,自动计算识别孔洞边界的区域面,进而解决模具分型时孔洞的自动修补问题。The invention determines the direction of the polygon by geometrically sorting the sides of the spatial polygon, constructs the direction vector of the side, and the azimuth vectors of the adjacent surfaces on both sides of the side, calculates the three-vector mixed product of the side direction vector and the azimuth vectors of the two adjacent surfaces, and According to the relationship between the three-vector mixed product and zero, the orientation of the two adjoining surfaces is judged, so as to realize the automatic calculation and identification of the area surface of the hole boundary according to the closed boundary of the hole, and then solve the problem of automatic repair of the hole during mold parting.
此外,本发明采用取边的起点和中点,由起点指向中点的方向构建边的方向矢量,能够满足不同类型边的统一计算;本发明利用构建的基准平面与邻接面求交线的方法,解决了由于曲面上取点不当导致邻接面方位矢量计算歧义的问题。通过实例验证,该方法针对不同的空间多边形,均能快速、准确的计算其同侧的邻接面区域。In addition, the invention adopts the starting point and midpoint of the edge, and constructs the direction vector of the edge from the direction from the starting point to the midpoint, which can satisfy the unified calculation of different types of edges; , which solves the problem of ambiguity in the calculation of the azimuth vector of the adjacency surface due to improper point selection on the surface. It is verified by examples that the method can quickly and accurately calculate the adjacent surface area on the same side for different spatial polygons.
附图说明Description of drawings
图1是背景技术中正则几何体面和边的拓扑关系图;Fig. 1 is the topological relation diagram of regular geometry face and edge in the background technology;
图2是本发明实施例中空间多边形的方向示意图;2 is a schematic diagram of the orientation of a spatial polygon in an embodiment of the present invention;
图3是本发明实施例中邻接面上点的位置关系图;Fig. 3 is a positional relationship diagram of points on adjacent surfaces in an embodiment of the present invention;
图4是本发明实施例中不同点构造的方位矢量关系图;Fig. 4 is the azimuth vector relation diagram of different point structures in the embodiment of the present invention;
图5是本发明实施例中在邻接面上靠近边的位置取点示意图;5 is a schematic diagram of a point-taking point at a position close to an edge on an adjoining surface in an embodiment of the present invention;
图6是本发明实施例中三矢量混合积判别原理示意图。FIG. 6 is a schematic diagram of a three-vector mixed product discrimination principle in an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例的附图,对本发明实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于所描述的本发明的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, embodiments of the present invention. Based on the described embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of the present invention.
在平面简单多边形中,一般规定逆时针方向为正,此时多边形内的点在左侧,反之亦然。对于平面简单多边形的内外点判别,有经典的射线法和标号法,基于方向因子和方向边的多边形内外点判断方法,基于平面转换的方法。In a plane simple polygon, it is generally specified that the counterclockwise direction is positive, and the points in the polygon are on the left side, and vice versa. For the discrimination of the inner and outer points of a plane simple polygon, there are the classical ray method and the labeling method, the method of judging the inner and outer points of the polygon based on the direction factor and the direction edge, and the method based on the plane transformation.
而对于一般的空间多边形,又称为广义多边形或空间曲边梯形,与平面简单多边形的主要区别在于:(1)所有顶点不全在同一个平面;(2)至少有一条边为曲线。因空间多边形的复杂性,没有固定的法向,也没有内外点之分,难以直接采用平面多边形的方法进行判断。For general spatial polygons, also known as generalized polygons or spatial curved-sided trapezoids, the main differences from plane simple polygons are: (1) Not all vertices are in the same plane; (2) At least one edge is a curve. Due to the complexity of spatial polygons, there is no fixed normal direction, and there is no distinction between inner and outer points, so it is difficult to directly use the method of plane polygons to judge.
为此,本发明实施例提出一种自动计算空间多边形同侧邻接区域面的方法,包括以下步骤:To this end, an embodiment of the present invention proposes a method for automatically calculating the same-side adjacent area surface of a spatial polygon, including the following steps:
步骤一:对空间多边形的边进行几何排序,确定多边形的方向Step 1: Geometrically sort the edges of the spatial polygon to determine the direction of the polygon
要计算空间多边形同侧的邻接面,首先必须确定多边形的方向,为了简化计算,不考虑多边形方向的正逆,仅保证各边方向的一致性。如图2所示,空间多边形ABCDEFA的6条边依次首尾相接,箭头代表多边形的方向,箭头方向首尾相接,则称为多边形边的方向一致。那么,以多边形为边界,将边的所有侧邻接面分为左侧区域和右侧区域。To calculate the adjoining surfaces on the same side of a spatial polygon, the orientation of the polygon must first be determined. In order to simplify the calculation, the forward and inverse directions of the polygon are not considered, and only the consistency of the directions of each side is guaranteed. As shown in Figure 2, the six sides of the spatial polygon ABCDEFA are connected end-to-end in sequence, the arrows represent the direction of the polygon, and the direction of the arrows is connected end-to-end, which means that the directions of the polygon edges are consistent. Then, taking the polygon as the boundary, divide all the side adjoining faces of the edge into a left area and a right area.
同时,考虑到多边形边的输入不一定是按照其几何位置顺序,故需要对边进行几何排序。在排序过程中,以第一条边的起点指向终点方向作为多边形的方向,并作为后续边的方向基准,依次搜索确定多边形的方向,方法如下:At the same time, considering that the input of polygon edges is not necessarily in the order of their geometric positions, it is necessary to geometrically sort the edges. In the sorting process, take the direction of the starting point of the first edge to the end point as the direction of the polygon, and use it as the direction reference of the subsequent edges, and sequentially search to determine the direction of the polygon. The method is as follows:
S1:从任意一条边出发,找到两个端点,将第一个端点定义为起点,第二个端点定义为终点,将起点设定为多边形起点,将终点设定为当前点;S1: Starting from any edge, find two endpoints, define the first endpoint as the starting point, the second endpoint as the ending point, set the starting point as the polygon starting point, and set the ending point as the current point;
S2:若剩余边为空,转到S4,否则,以当前点为目标,找到剩余边中端点与当前点重合的边;S2: If the remaining side is empty, go to S4, otherwise, take the current point as the target, and find the side whose endpoint in the remaining side coincides with the current point;
S3:以重合点为该边起点,另一端点为终点,更新当前点为该终点,剩余边减1,转到S2;S3: Take the coincident point as the starting point of the edge, and the other end point as the end point, update the current point as the end point, subtract 1 from the remaining side, and go to S2;
S4:若多边形起点与当前点重合,多边形封闭,否则不封闭。S4: If the starting point of the polygon coincides with the current point, the polygon is closed, otherwise it is not closed.
步骤二:构建边的方向矢量,构建边两侧邻接面的方位矢量Step 2: Construct the direction vector of the edge, and construct the azimuth vector of the adjacent faces on both sides of the edge
对于边的方向矢量,按边曲线类型,可分为3种情况:For the direction vector of the edge, according to the type of edge curve, it can be divided into three cases:
(1)直线边,方向矢量为起点指向终点;(1) Straight line side, the direction vector is the starting point to the end point;
(2)一般曲线,曲线切矢量在每个点都不同,取任意一个切矢量方向均可;(2) For general curves, the tangent vector of the curve is different at each point, and any direction of the tangent vector can be taken;
(3)若边为封闭环,如整圆曲线,边的起点和终点重合,则无法构建方向矢量。(3) If the edge is a closed loop, such as a full-circle curve, and the start and end points of the edge coincide, the direction vector cannot be constructed.
为解决封闭边曲线构建方向矢量失败的问题,同时简化计算,采用统一的计算方法,对任意类型边进行离散,取边的起点和中点,由起点指向中点的方向构建方向矢量。In order to solve the problem that the closed edge curve fails to construct the direction vector, and to simplify the calculation, a unified calculation method is used to discretize any type of edge, the starting point and midpoint of the edge are taken, and the direction vector is constructed from the starting point to the midpoint.
在构造邻接面方位矢量时,取边上一点指向曲面上特征点作为矢量。特殊的,取边的中点作为起点,由该点指向曲面上一点作为邻接面的方位矢量。When constructing the azimuth vector of the adjoining surface, take a point on the edge pointing to the feature point on the surface as the vector. Specially, the midpoint of the edge is taken as the starting point, and the point from this point to a point on the surface is taken as the azimuth vector of the adjacent surface.
在构造邻接面方位矢量时,若选择曲面上点不当时,可能会出现歧义。如图3所示,边E的邻接面F1和F2,在面F1上分别取不同的两点P11和P12,面F2上取点P2,P0为边E上一点。如图4所示,定义边的方向eV,显然,面F1位于左侧,F2位于右侧。由P0指向面的点构造方位矢量V11、V12、V2。显然,在面F1取点P11时,矢量V11相对eV在V2左侧,矢量方位关系与实际面的关系一致;而在面F1取点P12时,矢量V12相对eV在V2右侧,矢量方位关系与实际面的关系相反,此时会导致面侧计算错误,出现歧义。When constructing the adjacency vector, ambiguity may arise if the point on the surface is not selected properly. As shown in Figure 3 , the adjacent faces F1 and F2 of edge E, take two different points P11 and P12 on face F1 respectively, take point P2 on face F2, and P0 is a point on edge E . As shown in Figure 4, the direction eV of the edge is defined, obviously, the face F1 is on the left and F2 is on the right. Orientation vectors V 11 , V 12 , V 2 are constructed from the points of the P 0 pointing plane. Obviously, when the point P11 is taken on the plane F1, the vector V11 is on the left side of V2 relative to eV, and the azimuth relationship of the vector is consistent with that of the actual plane; and when the point P12 is taken on the plane F1, the vector V12 relative to eV is on the left side of the vector V12. On the right side of V 2 , the vector azimuth relationship is opposite to that of the actual surface. At this time, the calculation of the surface side will be wrong and there will be ambiguity.
为解决计算歧义,考虑在邻接面上取尽可能靠近边的点,具体取点方法为:以边的中点和边的方向矢量构建基准平面,求基准平面和邻接面的交线,当只有一条交线时,取交线的中点。如图5所示,边E的邻接面F1和F2,以边E中点和方向矢量做基准平面DP,求DP和F1、F2的交线C1、C2,C1、C2的中点P1、P2即为所求点。当基准平面和邻接面有且仅有一条交线时,这种方法能够保证取到合适的点。同时,在该方法中,选择边的中点构造基准平面,是为了保证在基准平面和每个邻接面至少产生一条交线。In order to solve the calculation ambiguity, consider taking the point as close as possible to the edge on the adjoining surface. The specific point selection method is: construct the datum plane with the midpoint of the edge and the direction vector of the edge, and find the intersection of the datum plane and the adjacent surface. When an intersecting line is found, take the midpoint of the intersecting line. As shown in Figure 5 , the adjacent faces F1 and F2 of edge E, take the midpoint of edge E and the direction vector as the reference plane DP, and find the intersection lines C1 , C2 , C1 , The midpoints P 1 and P 2 of C 2 are the desired points. This method can ensure that the appropriate point is obtained when the reference plane and the adjacent surface have one and only one intersection. At the same time, in this method, the midpoint of the edge is selected to construct the datum plane, in order to ensure that at least one intersection line is generated between the datum plane and each adjacent surface.
步骤三:计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位Step 3: Calculate the three-vector mixed product of the edge direction vector and the orientation vector of the two adjacent surfaces, and judge the orientation of the two adjacent surfaces according to the relationship between the three-vector mixed product and zero
如图6所示,边edge的两个邻接面分别为face1和face2,vecFwd为边的方向矢量;As shown in Figure 6, the two adjacent faces of the edge are face1 and face2, respectively, and vecFwd is the direction vector of the edge;
构造邻接面方位矢量vF1、vF2,分别为边上同一点到face1的点pnt1、face2上一点pnt2的方向矢量;Construct the adjacent face orientation vectors vF1 and vF2, which are the direction vectors from the same point on the edge to the point pnt1 of face1 and the point pnt2 on face2;
三个矢量的数学关系如下:The mathematical relationship of the three vectors is as follows:
(vF1×vF2)·vecFwd≤0 (1)(vF 1 ×vF 2 )·vecFwd≤0 (1)
(vF1×vF2)·vecFwd>0 (2)(vF 1 ×vF 2 )·vecFwd>0 (2)
若三个矢量满足式(1),vF1×vF2的矢量方向与vecFwd夹角大于在90°~180°,两者方向基本相反,则可判定face1为左侧面,face2为右侧面;If the three vectors satisfy formula (1), the angle between the vector direction of vF1×vF2 and vecFwd is greater than 90°~180°, and the two directions are basically opposite, it can be determined that face1 is the left side and face2 is the right side;
若三个矢量满足式(2),vF1×vF2的矢量方向与vecFwd夹角在0°~90°之间,两者方向基本一致,则face1为右侧面,face2为左侧面;If the three vectors satisfy formula (2), the vector direction of vF1×vF2 and the angle between vecFwd and vecFwd are between 0° and 90°, and the two directions are basically the same, then face1 is the right side and face2 is the left side;
模具分型中,若将分型线左侧面区域定义为型腔区域,则右侧面一定是型芯区域,根据上述方法能够自动计算出分型线左、右面区域。In mold parting, if the area on the left side of the parting line is defined as the cavity area, the right side must be the core area. According to the above method, the left and right areas of the parting line can be automatically calculated.
为了实现上述实施例,本申请实施例还提出一种自动计算空间多边形同侧邻接区域面的装置,包括排序模块,用于对空间多边形的边进行几何排序;In order to realize the above-mentioned embodiment, the embodiment of the present application also proposes an apparatus for automatically calculating the adjacent area surfaces on the same side of a spatial polygon, including a sorting module, which is used for geometrically sorting the edges of the spatial polygon;
构建模块,用于构建边的方向矢量,以及构建边两侧邻接面的方位矢量;The building block is used to construct the direction vector of the edge and the azimuth vector of the adjacent faces on both sides of the edge;
计算判断模块,用于计算边方向矢量和两邻接面方位矢量的三矢量混合积,并根据三矢量混合积与零的关系,判断两邻接面的方位。The calculation and judgment module is used to calculate the three-vector mixture product of the edge direction vector and the orientation vector of the two adjacent surfaces, and judge the orientation of the two adjacent surfaces according to the relationship between the three-vector mixture product and zero.
提供一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现上述实施例的自动计算空间多边形同侧邻接区域面的方法。A computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, realizes the method for automatically calculating the adjacent area surface on the same side of a spatial polygon according to the above embodiment.
一种计算机设备,包括处理器和存储器,所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以实现上述实施例的自动计算空间多边形同侧邻接区域面的方法。A computer device, comprising a processor and a memory, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to realize the automatic calculation space of the above embodiment Method for contiguous area faces on the same side of a polygon.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210388311.4A CN114800965A (en) | 2022-04-13 | 2022-04-13 | Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210388311.4A CN114800965A (en) | 2022-04-13 | 2022-04-13 | Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114800965A true CN114800965A (en) | 2022-07-29 |
Family
ID=82536271
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210388311.4A Pending CN114800965A (en) | 2022-04-13 | 2022-04-13 | Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114800965A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0778254A (en) * | 1993-09-08 | 1995-03-20 | Hitachi Ltd | Graphic closed area extraction method |
JP2009119716A (en) * | 2007-11-14 | 2009-06-04 | Fuji Xerox Co Ltd | Non-moldable portion detecting device, non-moldable portion detecting system, non-moldable portion detecting program, and non-moldable portion detecting method |
CN101739493A (en) * | 2008-11-04 | 2010-06-16 | 本田技研工业株式会社 | Method of determining mesh data and method of correcting model data |
JP5413532B1 (en) * | 2013-06-20 | 2014-02-12 | 富士ゼロックス株式会社 | PROJECTION DETECTION DEVICE, PROJECTION DETECTION SYSTEM, AND PROJECTION DETECTION PROGRAM |
CN113056358A (en) * | 2018-11-22 | 2021-06-29 | 马自达汽车株式会社 | Resin member, mold for molding resin member, and method for producing resin member |
-
2022
- 2022-04-13 CN CN202210388311.4A patent/CN114800965A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0778254A (en) * | 1993-09-08 | 1995-03-20 | Hitachi Ltd | Graphic closed area extraction method |
JP2009119716A (en) * | 2007-11-14 | 2009-06-04 | Fuji Xerox Co Ltd | Non-moldable portion detecting device, non-moldable portion detecting system, non-moldable portion detecting program, and non-moldable portion detecting method |
CN101739493A (en) * | 2008-11-04 | 2010-06-16 | 本田技研工业株式会社 | Method of determining mesh data and method of correcting model data |
JP5413532B1 (en) * | 2013-06-20 | 2014-02-12 | 富士ゼロックス株式会社 | PROJECTION DETECTION DEVICE, PROJECTION DETECTION SYSTEM, AND PROJECTION DETECTION PROGRAM |
CN113056358A (en) * | 2018-11-22 | 2021-06-29 | 马自达汽车株式会社 | Resin member, mold for molding resin member, and method for producing resin member |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114119611B (en) | Weld parameter identification method and device, electronic equipment and storage medium | |
US9030475B2 (en) | Method of computer-aided design of a modeled object having several faces | |
CN103365243B (en) | Method for rapidly generating corner side milling process path | |
CN113953685B (en) | A path planning method for laser cutting of flat plates | |
Owen et al. | Advancing Front Quadrilateral Meshing Using Triangle Transformations. | |
CN115510530B (en) | A Method for Automatically Constructing Revit 3D Models from CAD Plan Drawings | |
CN102629287A (en) | Automatic identification method based on standard for the exchange of product model data-compliant numerical control data interface (STEP-NC) intersection features | |
CN108537263A (en) | Grid map fusion method based on maximum public subgraph | |
CN114800965A (en) | Method and device for automatically calculating adjacent area surfaces on same side of spatial polygon | |
CN105447284A (en) | Technical allowance adding method | |
CN107145643A (en) | The intelligent design system and design method of a kind of metal plate sculpture type face steelframe | |
CN110356008A (en) | A kind of quick joining method of line segment at random based on Hash table | |
CN111610751B (en) | Interpolation error multi-subdivision iterative calculation method for cross point set NURBS interpolation curve | |
CN104778308B (en) | The recognition methods of aircaft configuration section bar and device | |
CN111251335A (en) | High-precision mechanical arm collision detection method based on bounding box algorithm | |
CN113704841B (en) | Bias-based optimized layout method | |
CN112987740B (en) | A mobile robot path planning control method | |
CN110399679B (en) | Foundation position optimization design method | |
CN110580736B (en) | Ray tracing method and system for plate mode non-uniform rational spline surface | |
Renbo et al. | A robust and topological correct marching cube algorithm without look-up table | |
Kwon et al. | Medial surface generation using chordal axis transformation in shell structures | |
CN110210162B (en) | Tapping method, tapping device, tapping machine and storage medium | |
CN114035509B (en) | Trajectory planning method and device for multiple surfaces | |
CN117537753B (en) | Method, system, equipment and storage medium for measuring asymmetric tooth-shaped gear | |
CN117634141B (en) | A method, device, equipment and medium for determining the initial branch spraying and mixing position of a tunnel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220729 |