Method and system for generating drawings for furniture design
Patent Information
- Application Number
- CN202611099762.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-30
AI Technical Summary
当上述简化模型被高倍率放大形成详图后,放大区域内的几何轮廓无法体现已标注的工艺结构,造成标注符号与可视图形之间缺乏对应,影响图纸表达的一致性;同时,自动标注算法只按固定规则在视图范围内分布标注,无法感知局部区域的实际工艺信息密度,容易在需要详细说明的位置遗漏关键标注,而在非关键位置又集中过多尺寸,导致生成的局部详图难以满足可读性与制造准确性的双重要求
1.在标注准确性与完整性层面,本发明通过从工艺属性集中提取加工操作信息推断预期几何痕迹,并与投影视图的可见几何轮廓进行匹配来识别缺失特征,使得因三维模型简化而未建模的工艺结构能够被自动检出,避免了详图中标注符号与可视图形之间出现不对应的情形,利用装配关系中配合零件已生成图纸的标注内容判断缺失特征的加工要求是否已被唯一确定,当配合特征标注内容覆盖缺失特征的完整尺寸与公差时不再重复标注,从而在保证加工信息完整的前提下减少了冗余标注,提升了图纸表达的准确性。
Smart Images

Figure CN123013202A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, and in particular to a method and system for generating drawings for furniture design. Background Technology
[0002] Furniture design drawings are typically generated using computer-aided design systems. These systems automatically project a three-dimensional geometric model of the furniture product to create two-dimensional engineering drawings. In addition to standard three-view drawings, these drawings include enlarged detail drawings to depict connection points, grooves, and edge banding details. When generating these enlarged detail drawings, the system performs geometric projection and scaled-up on selected areas of the three-dimensional model. It then automatically adds dimensions, tolerances, and process symbols according to preset annotation rules, thus outputting drawings for use in the manufacturing process.
[0003] In existing technologies for automatically generating such enlarged detailed drawings, the 3D model itself is often constructed in a simplified manner, with some process features only recorded in attributes or annotations and not actually constructed on the geometry. When the simplified model is enlarged at a high magnification to form a detailed drawing, the geometric contours within the enlarged area cannot reflect the labeled process structure, resulting in a lack of correspondence between the annotation symbols and the viewable graphics, affecting the consistency of the drawing. At the same time, the automatic annotation algorithm only distributes annotations within the view range according to fixed rules, failing to perceive the actual density of process information in local areas. This easily leads to the omission of key annotations in locations requiring detailed explanation, while too many dimensions are concentrated in non-critical locations, making it difficult for the generated detailed drawings to meet the dual requirements of readability and manufacturing accuracy. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for generating drawings for furniture design. The technical solution of the present invention to solve the above-mentioned technical problems is as follows: Methods for generating drawings for furniture design include: S1: Obtain the assembly relationships and process attribute set of the target 3D model region; S2: Generate a projected view of the target 3D model area according to a preset scale, and extract the visible geometric contours; S3: Extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the position of the missing feature is recorded. S4: Identify the mating features on the mating parts corresponding to the missing features based on the assembly relationship. If the mating features are marked in the generated mating part drawings and the marking content of the mating features uniquely determines the machining requirements of the missing features, then end the process; otherwise, proceed to S5. S5: Determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region. Determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the labeled candidate regions. S6: Calculate the existing label density within the label candidate area. If the label density exceeds the preset density, adjust the label position to a blank area adjacent to the label candidate area with a label density lower than the preset density, and generate the label content for the missing features.
[0005] Furthermore, the assembly relationships and process attribute set of the target 3D model region are obtained, including: obtaining the boundary definition of the target 3D model region, and extracting the target 3D model region from the furniture product assembly according to the boundary definition; extracting the mating constraints between parts within the target 3D model region as assembly relationships, and the mating constraints identify the contact surfaces and mating types between parts; traversing the parts within the target 3D model region, reading the process attributes attached to the parts to form a process attribute set, and the process attributes include processing operation information, feature names, and the position coordinates of the features on the parts.
[0006] Further, a projected view of the target 3D model region is generated according to a preset scale, and the visible geometric contour is extracted, including: determining the projection plane of the target 3D model region under a preset viewpoint, the projection plane being perpendicular to the line of sight of the preset viewpoint; mapping the 3D geometric data of the target 3D model region to the projection plane along the line of sight, and calculating the planar coordinates of the mapping points according to a preset scale to generate a projected view, the projected view containing depth information; performing depth discontinuity detection on the projected view, marking adjacent pixels with depth changes exceeding a threshold as contour points, and the visible geometric contour is formed by all contour points.
[0007] Furthermore, machining operation information is extracted from the process attribute set to infer the geometric traces that the machining operation corresponding to the machining operation information should present. If no geometric traces are found in the visible geometric contour, they are identified as missing features and their positions are recorded. This includes: extracting the machining operation type and operation parameters from the machining operation information in the process attribute set; querying the preset machining trace mapping table according to the machining operation type and operation parameters to obtain the contour description of the expected geometric trace; searching for contour segments in the visible geometric contour that match the contour description of the expected geometric trace; if no contour segment matching the contour description of the expected geometric trace is found in the visible geometric contour, the feature corresponding to the machining operation information is identified as a missing feature, and the position coordinates of the feature on the part are extracted from the process attribute set as the position of the missing feature.
[0008] Furthermore, the machining operation type and operation parameters are extracted from the machining operation information in the process attribute set. Based on the machining operation type and operation parameters, a query is performed in the preset machining trace mapping table to obtain the outline description of the expected geometric trace. This includes: matching the machining operation type with the operation type field in the preset machining trace mapping table to determine the matching record; extracting the reference geometry and parameter mapping function from the matching record; inputting the operation parameters into the parameter mapping function to calculate the shape parameter value; and combining the reference geometry and the shape parameter value to generate the outline description of the expected geometric trace. The outline description includes the type, size, and orientation information of the geometric primitives.
[0009] Further, based on the assembly relationship, identify the mating features on the mating parts corresponding to the missing feature. If the mating feature is already marked in the generated mating part drawing and the marking content of the mating feature uniquely determines the machining requirements of the missing feature, then the process ends; otherwise, execute S5, which includes: determining the contact surface of the missing feature on the part based on the position coordinates of the missing feature; searching for mating constraints containing the contact surface from the assembly relationship; taking another part in the mating constraint as the mating part and the contact surface of the other part in the mating constraint as the mating contact surface; extracting features located on the mating contact surface from the process attribute set of the mating parts as mating features; checking whether the generated mating part drawing contains the marking content of the mating feature. If it does, and the marking content of the mating feature contains the complete dimensions and tolerances of the missing feature, then the process ends; otherwise, execute S5.
[0010] Further, based on the location of the missing features, the expected region is determined, and blank candidate regions are generated around the expected region. The main reading axis of the projection view is determined, and the deviation of the centroid of each blank candidate region from the main reading axis is calculated. The annotation candidate region is determined by competition using a Voronoi diagram, including: determining the mapping point in the projection view based on the location coordinates of the missing features; delineating the expected region with the mapping point as the center and based on the operation influence range corresponding to the processing operation information; identifying areas in the projection view that are not covered by visible geometric contours and do not contain annotation content as available blank regions around the expected region; segmenting multiple rectangular regions in the available blank regions as blank candidate regions; performing principal component analysis on the coordinate points of the visible geometric contours in the projection view and extracting the straight line corresponding to the direction of maximum variance as the main reading axis; calculating the vertical distance from the centroid of each blank candidate region to the main reading axis as the deviation; constructing a Voronoi diagram with the centroid of each blank candidate region as the generation point; converting the deviation into attention weights; performing weighted competition in the Voronoi diagram; and determining the blank candidate region with the largest area after weighted competition as the annotation candidate region.
[0011] Furthermore, the deviation is converted into attention weights, and weighted competition is performed in the Voronoi diagram. The blank candidate region with the largest area after weighted competition is determined as the label candidate region. This includes: taking the reciprocal of the deviation of each blank candidate region and normalizing it to obtain the attention weight of each blank candidate region; constructing a Voronoi diagram with the centroid of each blank candidate region as the generation point, and assigning the attention weight of each blank candidate region to the Voronoi cell in the Voronoi diagram where the corresponding generation point is located; in the Voronoi diagram, each Voronoi cell expands along the boundary to adjacent Voronoi cells, and the expansion speed is proportional to the attention weight. When adjacent Voronoi cells meet, the expansion stops, and the area of the Voronoi cell after the expansion stops is used as the occupied area after weighted competition; comparing the occupied areas of each Voronoi cell, the blank candidate region corresponding to the Voronoi cell with the largest occupied area is determined as the label candidate region.
[0012] Further, the existing label density within the candidate label area is calculated. If the label density exceeds a preset density, the label position is adjusted to a blank area adjacent to the candidate label area with a label density lower than the preset density, generating label content for missing features. This includes: counting the number of label contents within the candidate label area, obtaining the area of the candidate label area, and calculating the ratio of the number of label contents to the area of the candidate label area as the existing label density; if the existing label density exceeds the preset density, the available blank areas adjacent to the candidate label area are traversed, the label density of the adjacent available blank areas is calculated, and the adjacent available blank area with a label density lower than the preset density is selected as the final label position; and the label content for missing features is generated at the final label position.
[0013] On the other hand, the present invention provides a drawing generation system for furniture design, comprising: The data acquisition module is used to acquire the assembly relationships and process attribute sets of the target 3D model area; The view generation module is used to generate a projected view of the target 3D model area according to a preset scale and extract the visible geometric contours; The feature recognition module is used to extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the location of the missing feature is recorded. The mating verification module is used to identify the mating features on mating parts that correspond to the missing features based on the assembly relationship. If the mating feature is marked in the generated mating part drawing and the marking content of the mating feature uniquely determines the processing requirements of the missing feature, the processing ends; otherwise, the position optimization module is executed. The location optimization module is used to determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region, determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the annotation candidate region. The annotation generation module is used to calculate the existing annotation density in the annotation candidate area. If the annotation density exceeds the preset density, the annotation position is adjusted to a blank area adjacent to the annotation candidate area and the annotation density is lower than the preset density, and the annotation content of the missing feature is generated.
[0014] The beneficial effects of this invention are: 1. Regarding the accuracy and completeness of annotation, this invention extracts processing operation information from the process attribute set to infer the expected geometric traces and matches them with the visible geometric contours of the projected view to identify missing features. This allows for the automatic detection of process structures that were not modeled due to 3D model simplification, avoiding discrepancies between annotation symbols in detail drawings and visible shapes. By utilizing the annotation content of the drawings already generated from the mating parts in the assembly relationship, it determines whether the processing requirements of the missing features have been uniquely determined. When the annotation content of the mating feature covers the complete dimensions and tolerances of the missing feature, it does not repeat the annotation. Thus, while ensuring the completeness of processing information, redundant annotations are reduced, and the accuracy of drawing representation is improved.
[0015] In terms of readability and layout rationality, by determining the main reading axis of the projected view, calculating the deviation of the centroid of each blank candidate area from the main reading axis, and using Voronoi diagram weighted competition to determine the candidate areas for annotations, the selection of annotation positions not only considers spatial availability but also takes into account the visual attention distribution patterns of the reader. Annotations are placed in areas with a higher probability of being scanned by the eye. At the same time, by detecting the existing annotation density in the candidate areas, the annotation positions of candidate areas with excessive density are adjusted to adjacent low-density available blank areas, making the annotations more uniform in the overall layout of the drawing and avoiding the decrease in readingability caused by local annotation accumulation. The above effects are embedded in the automatic process from generating the projected view to outputting the annotation content, improving the automation level of the computer-aided design system in furniture drawing generation. Attached Figure Description
[0016] Figure 1 This is a flowchart of the method for generating drawings for furniture design according to the present invention; Figure 2 This is a schematic diagram of the drawing generation system for furniture design according to the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1: Figure 1 The present invention provides a method for generating drawings for furniture design, comprising: S1: Obtain the assembly relationships and process attribute set of the target 3D model region; S2: Generate a projected view of the target 3D model area according to a preset scale, and extract the visible geometric contours; S3: Extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the position of the missing feature is recorded. S4: Identify the mating features on the mating parts corresponding to the missing features based on the assembly relationship. If the mating features are marked in the generated mating part drawings and the marking content of the mating features uniquely determines the machining requirements of the missing features, then end the process; otherwise, proceed to S5. S5: Determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region. Determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the labeled candidate regions. S6: Calculate the existing label density within the label candidate area. If the label density exceeds the preset density, adjust the label position to a blank area adjacent to the label candidate area with a label density lower than the preset density, and generate the label content for the missing features.
[0019] In a specific implementation of S1, within the 3D modeling environment, the furniture assembly is composed of multiple parts assembled according to preset mating constraints, with each part having attached process attributes. When it is necessary to generate drawings for a specific part of the furniture assembly, the target 3D model area for generating the drawings is first determined.
[0020] The boundary definition of the target 3D model region is provided by the user through the interactive interface via selection, point selection, or input of spatial coordinate range. After obtaining the spatial coordinate range of the user-specified region, the interface compares this range with the 3D spatial coordinates of the furniture assembly to determine the minimum and maximum values of the spatial coordinate range on the three coordinate axes. A cuboid bounding box is constructed based on these minimum and maximum values, and the interior area of this box constitutes the boundary definition of the target 3D model region. Then, all parts in the furniture assembly are traversed. For each part, its 3D bounding box data is obtained, and spatial intersection calculations are performed between this data and the boundary definition of the target 3D model region. When the bounding box of a part intersects with the boundary definition of the target 3D model region, the part is determined to be within the target 3D model region and added to the target part set. After traversing all parts of the furniture assembly, all parts in the target part set constitute the target 3D model region. For parts that only partially intersect with the boundary definition of the target 3D model region, the entire part is retained without geometric trimming to ensure the integrity of the part data.
[0021] After capturing the target 3D model region, the assembly relationships within that region are extracted. These relationships consist of mating constraints between parts. In the target part set, for each pair of adjacent parts, predefined mating constraint data is read. A mating constraint identifies the contact surface between two parts; a contact surface is a geometric surface on one part used to mate with another, and each contact surface corresponds to a contact surface identifier. The mating constraint also identifies the mating type, including fitting constraints, alignment constraints, angle constraints, and concentric constraints. The mating type is recorded in the type field of the mating constraint. All read mating constraints are summarized to obtain the assembly relationships of the target 3D model region. Each record in the assembly relationship contains the identifiers of the first and second parts, the contact surface identifiers on the first and second parts, and the mating type.
[0022] Simultaneously or subsequently, the process attributes of each part within the target 3D model region are extracted to form a process attribute set. Process attributes are non-geometric manufacturing information pre-attached to each part and stored in the corresponding attribute data structure. The attribute data structure includes a machining operation information field, a feature name field, and a feature position coordinate field. Each part in the target part set is traversed, and the attribute data structure is read for each part. The machining operation information field is extracted from the attribute data structure. This field stores a description of the type of manufacturing operation the part needs to undergo, such as drilling, milling, rounding, and tenoning, and also includes the corresponding operation parameters, such as the hole diameter and depth when drilling, the groove width and depth when milling, and the fillet radius when rounding. The feature name field is extracted from the attribute data structure. The feature name is used to identify the process attribute, such as a shelf groove, an eccentric connector embedded hole, and an edge chamfer. The feature position coordinate field is extracted from the attribute data structure. The feature's position coordinates on the part describe its spatial position in the part's local coordinate system, represented using 3D coordinates within the part's local coordinate system. The machining operation information, feature name, and feature position coordinates extracted from each part are combined into a process attribute record. All process attribute records for all parts form a process attribute set. Each process attribute record in the process attribute set is stored in correspondence with a part identifier, so that subsequent steps can look up the corresponding process attribute based on the part identifier.
[0023] Through the above process, three basic data sets were obtained for the target 3D model region used for subsequent projection view generation, missing feature detection, and annotation layout: the geometric entities of the target 3D model region composed of the target parts set, the assembly relationships identifying the mating relationships between parts, and the process attribute set containing machining operation information, feature names, and feature position coordinates. The target parts set provides 3D geometric data for generating the projection view, the assembly relationships provide mating information between parts for subsequent identification of mating features and determination of the necessity of annotation, and the process attribute set provides machining operation information and feature position information for each part for missing feature detection and annotation content generation.
[0024] In a specific implementation of S2, after obtaining the target part set of the target 3D model region in step S1, a projection view is generated using the 3D geometric data provided by the target part set. The preset viewing angle is specified by the user in the interactive interface. The user determines the preset viewing angle by selecting a predefined viewing direction or inputting a custom line of sight. The line of sight corresponding to the preset viewing angle is a 3D vector pointing from the observation point to the center point of the target 3D model region; the line of sight represents the direction in which the observer views the target 3D model region.
[0025] When determining the projection plane, a straight line is extended from the geometric center of the target 3D model region along the line of sight of the preset viewpoint. A plane is then drawn at a distance of one unit from the geometric center, such that the normal direction of the projection plane is parallel to and has the same direction as the line of sight. This projection plane is the determined projection plane. The projection plane is perpendicular to the line of sight of the preset viewpoint. The projection plane is an infinitely extending two-dimensional plane. In subsequent mapping processes, each point on the projection plane is represented by two-dimensional coordinates, defined by two coordinate axes on the projection plane.
[0026] When mapping the 3D geometric data of the target 3D model region onto the projection plane along the viewing direction, the 3D geometric data of each part in the target part set is obtained by traversing the entire set. The 3D geometric data is a mesh of triangular facets on the part surface, with each vertex containing 3D coordinates. For each of the three vertices of a triangular facet, the vertex is projected parallel to the viewing direction onto the projection plane using orthogonal projection. During orthogonal projection, a projection line is drawn from the vertex along the viewing direction; the intersection of this projection line and the projection plane is the planar coordinate of the mapped point. The planar coordinates of the mapped point are two-dimensional coordinates defined within the projection plane. The planar coordinates Pp of the mapped point are calculated as: Pp = Pv - V × ((V·(Pv-Po))); where V represents the unit vector along the viewing direction, Pv represents the 3D coordinates of the vertex, Po represents the 3D coordinates of the origin of the projection plane, · represents vector dot product, and × represents scalar-vector multiplication. Pp is a two-dimensional vector, with its components corresponding to the two coordinate axes on the projection plane.
[0027] During projection mapping, the depth information of each mapped point is recorded. The depth information is the perpendicular distance from the vertex to the projection plane, calculated as: D = |V·(Pv-Po)|; where V represents the unit vector in the viewing direction, Pv represents the 3D coordinates of the vertex, Po represents the 3D coordinates of the origin of the projection plane, · represents the dot product of vectors, and || represents taking the absolute value. The dimension of the depth value D is consistent with that of the 3D coordinates, representing the offset of the vertex relative to the projection plane in the viewing direction. Each mapped point corresponds to a depth value, which reflects the front-to-back relationship of the vertex in the original 3D geometric data along the viewing direction.
[0028] After mapping all vertices, the triangular faces are reorganized on the projection plane according to the planar coordinates of the mapped points, forming a projected view. Each pixel in the projected view is identified by the integer coordinate value of the mapped point's planar coordinates, and each pixel stores a color value and a depth value. When the mapped points of multiple triangular faces cover the same pixel location, the depth values of the mapped points of these multiple triangular faces are compared, and the color value corresponding to the mapped point with the smallest depth value is retained, so that the projected view can correctly reflect the shape and distance relationships of the visible surfaces in the 3D geometric data. The generated projected view contains depth information, which is stored together with the color map in the format of a depth map. The grayscale value of each pixel in the depth map represents the depth value corresponding to that pixel.
[0029] After generating the projected view, visible geometric contours are extracted. Visible geometric contours are the set of object boundaries and turning edges in the projected view. When performing depth discontinuity detection on the projected view, an edge detection operator is used to calculate the gradient magnitude of each pixel in the projected view. The gradient calculation uses both the color map and the depth map. For each pixel position, the color gradient is calculated on the color channel, and the depth gradient is calculated on the depth channel. The combined gradient magnitude G is calculated as: G = wc × Gc + wd × Gd; where wc represents the color gradient weight, Gc represents the color gradient magnitude, wd represents the depth gradient weight, and Gd represents the depth gradient magnitude. The weight coefficients wc and wd are set according to the material texture complexity of the projected view. Specifically, the variance of color values within the projected view is calculated; a larger variance indicates a more complex material texture. When the variance of color values exceeds a color variance threshold, wd is set to a value lower than wc, making edge detection rely more on color information; when the variance of color values does not exceed the color variance threshold, wd is set to a value higher than wc, making edge detection rely more on depth information. Pixels whose overall gradient magnitude G exceeds a preset depth discontinuity threshold are marked as contour points.
[0030] The color variance threshold is set based on the overall statistical distribution of color values within the projected view. Specifically, the mean of all pixel color values in the projected view is calculated. Taking the mean of color values as the center, a preset percentage range above and below the mean is taken as the normal texture fluctuation range. The variance value corresponding to the upper limit of the range is taken as the color variance threshold. The preset percentage range is 30%. When the material texture in a certain area has a regular repeating pattern, the preset percentage range can be reduced to 20%. When the material texture is highly random, the preset percentage range can be expanded to 40%.
[0031] The preset depth discontinuity threshold T is automatically set based on the depth range of the projected view. Specifically, it is set by statistically analyzing the depth value distribution across the entire projected view, calculating the maximum depth value Dmax and the minimum depth value Dmin, and then calculating the depth range R as: R = Dmax - Dmin. The preset depth discontinuity threshold T is calculated as: T = R × k, where k is a scaling factor, for example, k is set to 0.1. The scaling factor k is adjustable; decrease k when extracting finer contours, and increase k when filtering out noisy contours. During the judgment process, for each pixel, the comprehensive gradient magnitude G is compared with the preset depth discontinuity threshold T. When G exceeds T, the pixel is marked as a contour point.
[0032] After marking adjacent pixels whose depth changes exceed a preset depth discontinuity threshold as contour points, the visible geometric contour is formed by all marked contour points. Adjacent pixels refer to pixels that are coordinately adjacent in the two-dimensional image space, including horizontally adjacent, vertically adjacent, and diagonally adjacent. When the change in depth values between a pair of adjacent pixels exceeds the preset depth discontinuity threshold T, both of these adjacent pixels are marked as contour points. Finally, all contour points form a series of continuous edge lines, which constitute the extracted visible geometric contour. The visible geometric contour will be used in subsequent steps to match with expected geometric traces to determine missing features.
[0033] In a specific implementation of S3, after the visible geometric contour is extracted in step S2, the missing features are detected using the process attribute set obtained in step S1. The process attribute set contains process attribute records for each part within the target 3D model area. Each process attribute record contains processing operation information, feature name, and the feature's position coordinates on the part. Subsequent steps will process the processing operation information in each process attribute record to determine whether the geometric contour of the part surface can reflect the observable traces corresponding to the processing operation after the 3D geometric data is simplified and modeled.
[0034] When extracting machining operation information from the process attribute set, each process attribute record in the set is traversed. For each traversed process attribute record, the machining operation information field is read. The machining operation information field contains two parts: machining operation type and operation parameters. The machining operation type describes the type of manufacturing operation, such as drilling, milling, rounding, and tenoning. The operation parameters describe the dimensional parameters corresponding to the manufacturing operation. For example, the operation parameters for drilling include hole diameter and depth; for milling, they include groove width and depth; for rounding, they include radius; and for tenoning, they include tenon width and thickness.
[0035] After extracting the machining operation type and parameters from the machining operation information, a query is performed in a pre-defined machining mark mapping table based on the machining operation type and parameters to obtain the outline description of the expected geometric mark. The pre-defined machining mark mapping table is a pre-established correspondence table that stores the first correspondence between machining operation types and reference geometries, and the second correspondence between operation parameters and the dimensions of the reference geometries. The pre-defined machining mark mapping table is constructed as follows: For each common machining operation type in furniture manufacturing, the reference geometry produced by the machining operation type on the part surface is determined. For example, drilling corresponds to a circular contour, milling corresponds to a rectangular contour, rounding corresponds to a rounded edge contour, and tenoning corresponds to a rectangular protrusion contour. The first correspondence between the machining operation type and the reference geometry is written into the operation type field and the reference geometry field of the pre-defined machining mark mapping table. For each reference geometry, shape parameters are defined, which determine the specific dimensions of the reference geometry in a two-dimensional projection. A parameter mapping function is established between the operation parameters and the shape parameters, defining how to convert the operation parameters into shape parameter values. For example, in the operation parameters of the drilling operation type, the hole diameter is directly mapped to the diameter of the circular profile, and the depth does not affect the shape in the two-dimensional projection; in the operation parameters of the milling operation type, the groove width is mapped to the width of the rectangular profile, and the groove depth is mapped to the length of the rectangular profile; in the operation parameters of the fillet operation type, the fillet radius is mapped to the radius of the arc edge profile. The second correspondence is stored in the matching records of the preset machining mark mapping table in the form of parameter mapping functions.
[0036] When querying the preset machining trace mapping table, the extracted machining operation types are matched row by row with the operation type field in the preset machining trace mapping table. When the machining operation type completely matches the operation type field of a certain row in the preset machining trace mapping table, that row is determined to be a matching record. The reference geometry field and parameter mapping function field are extracted from the matching record. The reference geometry field stores the reference geometry, which is the shape type that the machining operation should present in a two-dimensional projection, such as a circle, rectangle, or arc edge. The parameter mapping function field stores the parameter mapping function, and each parameter value in the operation parameters is used as the input to the parameter mapping function for calculation to obtain the shape parameter value. The reference geometry and the calculated shape parameter value are combined to generate the contour description of the expected geometric trace. The contour description includes the type, size, and orientation information of the geometric primitives. The type of the geometric primitive is the type of the reference geometry, the size is the size determined by the shape parameter value, and the orientation information is determined according to the normal direction of the contact surface where the feature is located on the part. The normal direction of the contact surface is extracted from the geometric data of the contact surface in the assembly relationship obtained in step S1.
[0037] After generating the contour description of the expected geometric trace, a search is conducted within the visible geometric contours to find contour segments that match the contour description. The visible geometric contours are the continuous set of edge lines formed by contour points extracted in step S2. The search process performs shape matching between the geometric primitives defined in the contour description and the contour segments in the visible geometric contours. Shape matching employs a shape comparison method based on geometric primitives. The geometric primitive type in the contour description defines the geometric type of the target contour, and the shape parameter value defines the size range of the target contour. Contour segments with the same geometric primitive type and dimensions within the tolerance range are retrieved from the visible geometric contours. The tolerance is set according to the dimensional accuracy level corresponding to the machining operation type. The dimensional accuracy level is divided as follows: machining operation types are divided into general accuracy operations and high accuracy operations according to manufacturing accuracy requirements. General accuracy operations include milling and tenoning, while high accuracy operations include drilling and rounding. The tolerance for general accuracy operations is set to ±10% of the shape parameter value, and the tolerance for high accuracy operations is set to ±5% of the shape parameter value. During shape matching, each continuous edge line in the visible geometric contour is fitted as a geometric primitive and compared with the geometric primitive type and size in the contour description. When the types are consistent and the ratio of the absolute value of the size difference to the shape parameter value is less than the allowable error, the match is considered successful.
[0038] When a contour segment matching the expected geometric mark is found in the visible geometric contour, it indicates that the machining operation corresponding to the machining operation information already has a corresponding geometric representation in the 3D geometric data, and no additional annotation is needed. If no contour segment matching the expected geometric mark is found in the visible geometric contour, it indicates that the 3D geometric data is missing the geometric shape corresponding to the machining operation due to simplified modeling. The feature corresponding to the machining operation information is identified as a missing feature. The position coordinates of the feature on the part are extracted from the process attribute record of the part where the missing feature is located. The position coordinates of the feature on the part are read from the feature position coordinate field. The extracted position coordinates are used as the position of the missing feature, which will be used for annotation and positioning in subsequent steps.
[0039] The pre-defined machining trace mapping table only needs to be built once and can be incrementally updated as furniture manufacturing processes expand. When a new machining operation type appears, a new record is added to the pre-defined machining trace mapping table, populated with the baseline geometry and parameter mapping function corresponding to the new machining operation type. This reverse inference method based on the pre-defined machining trace mapping table does not rely on the high-precision geometric details of the 3D model, but instead uses manufacturing process knowledge for missing feature detection. This solves the problem of mismatch between geometric contours and process features in simplified modeling, and has stronger robustness and process-specificity than existing solutions that simply rely on model geometric feature recognition.
[0040] In a specific implementation of S4, after determining the missing feature and recording its location in step S3, the necessity of labeling the missing feature is determined using the assembly relationship obtained in step S1. In furniture product assemblies, the corresponding features of mating parts are often already labeled in the drawings of the mating parts. When the labeling content of the mating feature can uniquely determine the processing requirements of the missing feature, it is unnecessary to repeatedly label it on the drawing of the part where the missing feature is located, as this would cause redundancy in drawing information and increase labeling density. Step S4 determines whether it is necessary to continue to independently label the missing feature by checking the existing labeling information in the drawings of the mating parts.
[0041] When determining the contact surface of a missing feature on a part based on its position coordinates, the position coordinates of the missing feature recorded in step S3 are compared spatially with the geometric data of the part containing the missing feature. The geometric data of the part includes the geometric definitions of each contact surface. Each contact surface is defined by its normal vector, the coordinates of a reference point on the contact surface, and its boundary range. Substituting the position coordinates of the missing feature into the distance calculation formula for each contact surface, the in-plane determination distance d is calculated as: d = |N·(P-P0)|; where d represents the in-plane determination distance, N represents the unit normal vector of the contact surface, P represents the position coordinates of the missing feature, P0 represents the coordinates of the reference point on the contact surface, · represents vector dot product, and || represents taking the absolute value. When the in-plane determination distance d is less than the in-plane determination tolerance, the position coordinates of the missing feature are determined to be on the contact surface. The dimension of the in-plane determination distance d is consistent with the dimension of the three-dimensional coordinates, representing the perpendicular distance from the position coordinates of the missing feature to the contact surface. The in-plane judgment tolerance is set according to the part modeling accuracy. Specifically, the in-plane judgment tolerance is set to half of the part modeling accuracy. For example, when the modeling accuracy is 0.1 mm, the in-plane judgment tolerance is set to 0.05 mm. When the modeling accuracy is 0.01 mm, the in-plane judgment tolerance is set to 0.005 mm.
[0042] After determining the contact surface on the part where the missing feature is located, the assembly relationship is searched for mating constraints that contain the contact surface of the missing feature. The assembly relationship consists of the mating constraints extracted in step S1. Each mating constraint includes a first part identifier, a second part identifier, a contact surface identifier on the first part, a contact surface identifier on the second part, and a mating type. The assembly relationship is matched line by line using the part identifier of the part containing the missing feature and the contact surface identifier of the contact surface where the missing feature is located as query conditions. When the first part identifier in a mating constraint matches the part identifier of the part containing the missing feature, and the contact surface identifier on the first part matches the contact surface identifier of the contact surface where the missing feature is located, this mating constraint is a mating constraint that contains the contact surface of the missing feature. The second part in this mating constraint is the mating part, and the contact surface on the second part is the mating contact surface. Similarly, when the second part identifier in a certain mating constraint is consistent with the part identifier of the part containing the missing feature, and the contact surface identifier on the second part is consistent with the contact surface identifier of the contact surface where the missing feature is located, the first part in the mating constraint is the mating part, and the contact surface on the first part is the mating contact surface.
[0043] After identifying the mating parts and mating contact surfaces, features located on the mating contact surfaces are extracted from the process attribute set of the mating parts, serving as mating features. The process attribute set of the mating parts was extracted in step S1 along with the process attribute sets of other parts within the target 3D model area. Each process attribute record in the process attribute set of the mating parts is traversed, and for each traversed record, the position coordinates of the features on the part are extracted. The extracted position coordinates of the features on the part are compared with the geometric definition of the mating contact surface to determine whether the position coordinates of the features on the part are located on the mating contact surface. When the position coordinates of the features on the part are located on the mating contact surface, the feature corresponding to that process attribute record is the mating feature. A one-to-one mating correspondence is formed between the mating features and missing features through mating constraints in the assembly relationship. This mating correspondence ensures a direct correlation between the annotation content of the mating features and the processing requirements of the missing features.
[0044] After determining the mating features, check whether the generated mating part drawings contain annotations for those features. The generated mating part drawings are drawing files obtained by generating drawings for the mating parts individually before this method is executed or during parallel execution. The generated mating part drawings contain annotations for each feature on the mating parts, including dimensions and tolerances. Retrieve the annotations for the mating features from the generated mating part drawings by matching the feature names of the mating features with the feature names associated with each annotation in the generated mating part drawings. When a match is successful, read the dimension and tolerance values of the matched annotation.
[0045] When the generated mating part drawing contains annotations for mating features, it is determined whether the annotations of the mating features can uniquely identify the machining requirements of the missing feature. The determination method is to compare the dimensional values and tolerance values in the annotations of the mating features with the operation parameters in the machining operation information corresponding to the missing feature. The machining operation information corresponding to the missing feature has already been extracted from the process attribute set in step S3. When the dimensional values in the annotations of the mating features are consistent with the dimensional values in the operation parameters of the missing feature, and the tolerance range in the annotations of the mating features is within the tolerance range required by the missing feature, the annotations of the mating features can uniquely identify the machining requirements of the missing feature. For example, if the missing feature is a drilling operation, the hole diameter in the operation parameters of the missing feature is 8 mm, and the required tolerance range is plus or minus 0.1 mm; if the annotations of the mating features in the generated mating part drawing contain a hole diameter of 8 mm and a tolerance of plus or minus 0.05 mm, then the annotations of the mating features can uniquely identify the machining requirements of the missing feature. In this case, the processing ends, and the subsequent annotation and positioning steps for the missing feature are not performed. If the annotation content of the mating feature is missing, or the size value in the annotation content of the mating feature is inconsistent with the size value in the operation parameters of the missing feature, or the tolerance range in the annotation content of the mating feature exceeds the tolerance range required by the missing feature, then it is determined that the annotation content of the mating feature cannot uniquely determine the processing requirements of the missing feature. At this time, step S5 is executed to independently locate and generate annotation content for the missing feature.
[0046] The assembly context-based annotation necessity judgment method utilizes the mate constraints between mating parts in a furniture product assembly. By checking the annotation information in the generated drawings of mating parts, redundant annotations are eliminated, avoiding the problem of repeatedly annotating the same mate information in the drawings of parts with missing features and the drawings of mating parts. Compared with the existing method of annotating each part independently, this method can effectively reduce the overall annotation density of the drawings, improve the conciseness of the drawing information, and ensure the complete coverage of processing information at the drawing set level.
[0047] In a specific implementation of S5, after determining in step S4 that the annotation content of the missing feature cannot be uniquely determined by the existing annotations of the mating parts, step S5 is executed to determine the annotation position of the missing feature in the projection view. The core objective of step S5 is to find an annotation placement position in the blank area of the projection view that is both close to the expected area of the missing feature and conforms to the visual attention distribution pattern of the reader.
[0048] When determining the mapping point in the projection view based on the position coordinates of the missing feature, the position coordinates of the missing feature recorded in step S3 and the mapping relationship from 3D space to the projection plane established in step S2 are used for processing. The position coordinates of the missing feature are 3D coordinates in the part's local coordinate system. To determine the mapping point, the position coordinates of the missing feature must first be transformed to the projection coordinate system corresponding to the projection view. The transformation method is consistent with the orthogonal projection mapping when processing the 3D geometric data of the target 3D model area in step S2. The transformation of the position coordinates of the missing feature from the part's local coordinate system to the world coordinate system is completed through the part's pose matrix in the assembly. The pose matrix is implicitly given in the target 3D model area data in step S1. The planar coordinates Qm of the mapped point are calculated as follows: Qm = Qo + (Pw - (V × (V · (Pw - Po)))); where Qm represents the two-dimensional coordinates of the mapped point on the projection plane, Qo represents the two-dimensional coordinates of the origin of the projection plane on the projection plane, Pw represents the three-dimensional coordinates of the missing feature in the world coordinate system, V represents the unit vector of the viewing direction, Po represents the three-dimensional coordinates of the origin of the projection plane, · represents the dot product of vectors, and × represents the multiplication of a scalar and a vector. Qm is a two-dimensional vector with components representing the two coordinate axes on the projection plane, and its dimensions are consistent with those of the projection plane coordinates. After calculating the mapped point Qm, the mapped point lies within the two-dimensional plane corresponding to the projected view.
[0049] When defining the expected area, the size and shape of the expected area are determined based on the operation influence range corresponding to the machining operation information, with the mapping point Qm as the center. The machining operation information has been extracted from the process attribute set in step S3, including the machining operation type and operation parameters. The operation influence range represents the visual space range occupied by the machining operation in the projection view. The operation influence range is determined by predefined rules and associated with the machining operation type. For example, for drilling operations, the operation influence range is a circular area, and the radius of the circular area is the hole diameter value in the drilling operation parameters multiplied by a magnification factor, for example, 1.5, so that the expected area can cover the hole generated by the drilling on the working surface and its surrounding influence area; for milling operations, the operation influence range is a rectangular area, the length of the rectangular area is the groove depth parameter value, and the width is the groove width parameter value, and the length and width directions are determined by the direction of the milling groove on the contact surface; for rounding operations, the operation influence range is a strip-shaped area along the chamfer edge, and the width of the strip-shaped area is the rounded corner radius parameter value. Once the scope of the operation's influence is determined, the geometry defined by the scope of the operation's influence is expanded outwards from the mapping point Qm. The expanded area is the expected area. The expected area represents the spatial location that the missing feature should have occupied in the projected view, and it is the target area that the annotation guide lines need to connect.
[0050] When identifying available blank areas around the expected area, it is necessary to detect which areas within the projected view are neither covered by visible geometric contours nor occupied by placed annotations. Visible geometric contours are continuous edge lines formed by contour points extracted in step S2, dividing the projected view into geometric shape areas and blank areas. Placed annotations refer to the annotation text and guide lines generated by this method during the previous processing of other missing features; these placed annotations occupy a certain pixel range in the projected view. When identifying available blank areas, the entire image area of the projected view is scanned pixel-by-pixel, excluding pixels that meet any of the following conditions: pixels belonging to areas enclosed by visible geometric contours, or pixels belonging to areas covered by placed annotations. The remaining unexcluded pixels constitute the set of available blank areas. Available blank areas are one or more unconnected regions.
[0051] When segmenting multiple rectangular regions as blank candidate regions within the available blank area, the process is based on the connected component analysis results of the available blank area. For each connected region within the available blank area, the minimum bounding rectangle of the connected region is calculated. A rectangular region is generated with the center of the minimum bounding rectangle as its centroid and its length and width as its dimensions. Furthermore, multiple rectangular regions are generated within each connected region using a sliding window with a preset step size, set to half the side length of the rectangular region. This generates multiple candidate blank regions within the available blank area. Each candidate blank region should have sufficient size to accommodate a section of labeled text. The minimum size of the candidate blank region is limited to 1.2 times the estimated size of the labeled text, which is calculated based on the required character length and preset font size.
[0052] When determining the main reading axis of a projected view, principal component analysis (PCA) is performed based on the coordinates of the visible geometric contours. The main reading axis reflects the overall distribution direction of the geometry within the projected view, corresponding to the human eye's scanning habit along the main direction of the graphic. The planar coordinates of all contour points are extracted from the visible geometric contours, forming a sample point set. PCA is then performed on this sample point set to calculate its covariance matrix, and the eigenvalues and eigenvectors are obtained. The covariance matrix is a 2x2 symmetric matrix, with two eigenvalues corresponding to two eigenvectors. The direction of the eigenvector corresponding to the largest eigenvalue is taken as the direction of maximum variance. The straight line passing through the mean point of the sample point set and along the direction of maximum variance is the main reading axis. The direction of the main reading axis reflects the extension direction of the main shape of the view.
[0053] When calculating the deviation of the centroid of each blank candidate area from the main reading axis, for each blank candidate area, the coordinates of the centroid are taken. The centroid coordinates are the planar coordinates of the center point of the rectangular area. The perpendicular distance from the centroid to the main reading axis is the deviation. The deviation E is calculated as follows: Where E represents the deviation, a, b, and c represent the coefficients of the general linear equation of the main reading axis, expressed as a×x + b×y + c = 0, where x and y are the independent variables of the linear equation, representing the two-dimensional coordinates of any point on the main reading axis, and xc and yc represent the two-dimensional coordinates of the centroid of the blank candidate area. The absolute value of the expression is calculated by substituting xc into x and yc into y, respectively. The dimensions of the deviation E are consistent with the coordinates of the projected view. The smaller the deviation, the closer the blank candidate area is to the main reading axis, and the higher the probability that the reader's gaze will sweep over the blank candidate area.
[0054] When using Voronoi diagrams to competitively determine candidate regions for annotation, each blank candidate region is considered a candidate location competing for attention. First, a standard Voronoi diagram is constructed using the centroid of each blank candidate region as the generation point. The Voronoi diagram divides the projected view plane into multiple Voronoi units, where the distance from any point within each Voronoi unit to its corresponding generation point is less than its distance to other generation points. Then, the deviation is converted into attention weights. The conversion method is as follows: take the reciprocal of the deviation E of each blank candidate region, and then normalize the reciprocal value by dividing each reciprocal value by the sum of all reciprocal values to obtain the attention weight of each blank candidate region. The attention weight Ai is calculated as: Ai = (1 / Ei) / Σj(1 / Ej); where Ai represents the attention weight of the i-th blank candidate region, Ei represents the deviation of the i-th blank candidate region, Ej represents the deviation of the j-th blank candidate region, and Σj represents the summation over all blank candidate regions. Attention weights are dimensionless proportional values ranging from 0 to 1, and the sum of the attention weights of all blank candidate regions equals 1. The smaller the deviation of a blank candidate region, the greater its attention weight, indicating that the blank candidate region receives more attention from the reader.
[0055] After assigning attention weights to the Voronoi cells containing the corresponding generated points in the Voronoi diagram for each blank candidate region, a weighted competitive expansion process is executed. In this process, each Voronoi cell expands along its boundary towards adjacent Voronoi cells, with the expansion speed proportional to the attention weight. Specifically, expansion is simulated by moving the cell boundary points outwards along the normal direction. The step size in each iteration is set to the attention weight multiplied by the base step size, which is one-thousandth of the diagonal length of the projected view. Expansion stops in that direction when the expansion fronts of two adjacent Voronoi cells meet. The expansion process continues until the boundaries of all Voronoi cells meet the boundaries of their adjacent Voronoi cells, reaching a state of equilibrium. At this point, the area of each Voronoi cell after expansion stops is measured as the occupied area after weighted competition. Voronoi cells with larger occupied areas indicate that their corresponding blank candidate regions have won in the attention competition, because the higher attention weight causes the boundary to expand further, encroaching on the territory of adjacent Voronoi cells. By comparing the occupied areas of each Voronoi cell, the blank candidate region corresponding to the Voronoi cell with the largest occupied area is determined as the labeling candidate region.
[0056] The method for determining candidate annotation regions based on the reading axis and the competition between Voronoi diagram spaces does not simply select the blank area closest to the missing feature. Instead, it comprehensively considers the overall reading directionality of the view and the attention competition relationship between multiple candidate blank areas, so that the final selected candidate annotation regions are more in line with the reader's visual search patterns.
[0057] In a specific implementation of S6, after determining the annotation candidate area in step S5, the annotation candidate area may already contain a large number of annotations. Directly generating new annotations in the annotation candidate area would increase the annotation density and reduce the local readability of the drawing. Step S6 detects the existing annotation density in the annotation candidate area and, when the existing annotation density exceeds the limit, migrates the annotation position to the adjacent low-density available blank area to ensure that the annotation content of missing features is generated in a reasonable density environment.
[0058] When calculating the existing label density within the label candidate area, the number of placed labels within the candidate area is first counted. Placed labels refer to the labeled text and guide lines generated during the previous processing of other missing features. The position coordinates and coverage area of the placed labels in the projection view have been recorded. The label candidate area is obtained from step S5. The counting method is as follows: traverse the placed labels, obtain the coverage area of each placed label, and perform spatial intersection judgment between the coverage area of the placed label and the label candidate area. When the coverage area of the placed label intersects with the label candidate area, the placed label is included in the number of labels within the label candidate area. Then, the area of the label candidate area is obtained, which is derived from the area value of the rectangular area recorded when generating the blank candidate area in step S5. The existing label density ρ is calculated as: ρ = n / A; where ρ represents the existing label density, n represents the number of labels within the label candidate area, and A represents the area of the label candidate area. The dimension of the existing annotation density ρ is the negative square of the length unit, such as the number of annotations per square millimeter. ρ reflects the spatial density of the annotation content in the annotation candidate area.
[0059] After the existing annotation density is calculated, it is compared with the preset density. The preset density is a density upper limit set in advance according to the overall annotation layout requirements of the drawing. The specific setting method of the preset density is as follows: obtain the total area of the projection view and the total number of missing features determined in step S3. The total area of the projection view is calculated from the pixel size of the projection view generated in step S2. The total number of annotations is equal to the sum of the total number of missing features and the number of already placed annotations. The average annotation density is equal to the total number of annotations divided by the total area of the projection view. The preset density is the average annotation density multiplied by the density upper limit coefficient. The density upper limit coefficient is set according to the proportion of available blank area in the projection view. The proportion of available blank area in the projection view is equal to the total pixel area of available blank area in step S5 divided by the total pixel area of the projection view. When the proportion of available blank area is greater than 0.5, the density upper limit coefficient is, for example, 2.0; when the proportion of available blank area is greater than 0.3 and not greater than 0.5, the density upper limit coefficient is, for example, 1.5; when the proportion of available blank area is not greater than 0.3, the density upper limit coefficient is, for example, 1.2. Through the above dynamic setting method, the preset density can be adaptively adjusted according to the actual drawing size conditions. The comparison method between the existing label density and the preset density is as follows: the existing label density ρ in the label candidate area is compared with the preset density. When the existing label density ρ is greater than the preset density, it is determined that the label density in the label candidate area has exceeded the upper limit of the design requirements. Directly generating label content in the label candidate area will further aggravate the label congestion.
[0060] When the existing label density exceeds the preset density, the label position is adjusted to a usable blank area adjacent to the label candidate area and with a label density lower than the preset density. The usable blank areas adjacent to the label candidate area are traversed. Adjacent usable blank areas refer to usable blank areas adjacent to the boundary of the label candidate area; these usable blank areas were identified in step S5. The traversal method is as follows: starting from the four edges of the label candidate area, we detect usable blank areas one by one towards the outside of the label candidate area until we find a usable blank area with a label density lower than the preset density. For each detected usable blank area, the label density of the usable blank area is calculated. The calculation method is the same as that for the existing label density of the label candidate area, i.e., counting the number of labels already placed in the usable blank area, obtaining the area of the usable blank area, and calculating the ratio of the number of labels already placed to the area of the usable blank area as the label density of the usable blank area. When the label density of the usable blank area is lower than the preset density, the usable blank area is taken as the final label position. If the label density of all adjacent available blank areas is not lower than the preset density, the search range is expanded to the next adjacent available blank area, and the label density of the next adjacent available blank area is calculated and compared with the preset density until an available blank area with a label density lower than the preset density is found. The available blank area with a label density lower than the preset density is taken as the final label position.
[0061] After determining the final annotation location, annotation content for the missing feature is generated at that location. The annotation content includes annotation text and leader lines. The annotation text is generated based on the operation parameters and preset annotation format from the machining operation information corresponding to the missing feature. For example, the annotation text includes an abbreviation of the machining operation type and the operation parameter value. The leader line connects from the final annotation location to the expected area determined in step S5. The visual style of the annotation content, including the font size and leader line type, adopts the same style settings as the annotation content in the generated mating part drawings to ensure a consistent annotation style across the entire set of drawings. After generating the annotation content, it is marked as placed annotation content, and the coverage area of the annotation content in the projected view is recorded for subsequent density calculations and identification of available blank areas when processing other missing features.
[0062] By judging the density of the candidate annotation area and adjacent available blank areas, the annotation content is guided to the low-density area, avoiding the problem of excessively dense local annotations caused by uneven annotation distribution, so that the final drawing annotations tend to be uniform in the overall layout.
[0063] Example 2: Figure 2 A schematic diagram of the drawing generation system for furniture design according to the present invention is provided. The drawing generation system for furniture design includes: The data acquisition module is used to acquire the assembly relationships and process attribute sets of the target 3D model area; The view generation module is used to generate a projected view of the target 3D model area according to a preset scale and extract the visible geometric contours; The feature recognition module is used to extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the location of the missing feature is recorded. The mating verification module is used to identify the mating features on mating parts that correspond to the missing features based on the assembly relationship. If the mating feature is marked in the generated mating part drawing and the marking content of the mating feature uniquely determines the processing requirements of the missing feature, the processing ends; otherwise, the position optimization module is executed. The location optimization module is used to determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region, determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the annotation candidate region. The annotation generation module is used to calculate the existing annotation density in the annotation candidate area. If the annotation density exceeds the preset density, the annotation position is adjusted to a blank area adjacent to the annotation candidate area and the annotation density is lower than the preset density, and the annotation content of the missing feature is generated.
[0064] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.
[0065] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.
[0066] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. Computer-readable storage media can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0067] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0068] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0069] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0070] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0071] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0072] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0073] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for generating drawings for furniture design, characterized in that, include: S1: Obtain the assembly relationships and process attribute set of the target 3D model region; S2: Generate a projected view of the target 3D model area according to a preset scale, and extract the visible geometric contours; S3: Extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the position of the missing feature is recorded. S4: Identify the mating features on the mating parts corresponding to the missing features based on the assembly relationship. If the mating features are marked in the generated mating part drawings and the marking content of the mating features uniquely determines the machining requirements of the missing features, then end the process; otherwise, proceed to S5. S5: Determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region. Determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the labeled candidate regions. S6: Calculate the existing label density within the label candidate area. If the label density exceeds the preset density, adjust the label position to a blank area adjacent to the label candidate area with a label density lower than the preset density, and generate the label content for the missing features.
2. The method for generating drawings for furniture design according to claim 1, characterized in that, The process of obtaining the assembly relationships and process attribute set of the target 3D model region includes: obtaining the boundary definition of the target 3D model region; extracting the target 3D model region from the furniture product assembly based on the boundary definition; extracting the mating constraints between parts within the target 3D model region as the assembly relationship, with the mating constraints identifying the contact surfaces and mating types between parts; traversing the parts within the target 3D model region and reading the process attributes attached to the parts to form a process attribute set, with the process attributes including processing operation information, feature names, and the position coordinates of the features on the parts.
3. The method for generating drawings for furniture design according to claim 1, characterized in that, Generate a projected view of the target 3D model region according to a preset scale and extract the visible geometric contours, including: determining the projection plane of the target 3D model region under a preset viewpoint, the projection plane being perpendicular to the line of sight of the preset viewpoint; mapping the 3D geometric data of the target 3D model region to the projection plane along the line of sight, and calculating the planar coordinates of the mapping points according to a preset scale to generate a projected view, the projected view containing depth information; performing depth discontinuity detection on the projected view, marking adjacent pixels with depth changes exceeding a threshold as contour points, and forming the visible geometric contours from all contour points.
4. The method for generating drawings for furniture design according to claim 1, characterized in that, The machining operation information is extracted from the process attribute set. The geometric traces that the machining operation should present are inferred from the machining operation information. If no geometric traces are found in the visible geometric contour, they are identified as missing features and their positions are recorded. This includes: extracting the machining operation type and operation parameters from the machining operation information in the process attribute set; querying the preset machining trace mapping table according to the machining operation type and operation parameters to obtain the contour description of the expected geometric trace; searching for contour segments that match the contour description of the expected geometric trace in the visible geometric contour; if no contour segment that matches the contour description of the expected geometric trace is found in the visible geometric contour, the feature corresponding to the machining operation information is identified as a missing feature, and the position coordinates of the feature on the part are extracted from the process attribute set as the position of the missing feature.
5. The method for generating drawings for furniture design according to claim 4, characterized in that, The machining operation type and operation parameters are extracted from the machining operation information in the process attribute set. Based on the machining operation type and operation parameters, the pre-set machining trace mapping table is queried to obtain the outline description of the expected geometric trace. This includes: matching the machining operation type with the operation type field in the pre-set machining trace mapping table to determine the matching record; extracting the reference geometry and parameter mapping function from the matching record; inputting the operation parameters into the parameter mapping function to calculate the shape parameter value; and combining the reference geometry and the shape parameter value to generate the outline description of the expected geometric trace. The outline description includes the type, size, and orientation information of the geometric primitives.
6. The method for generating drawings for furniture design according to claim 1, characterized in that, Identify the mating features corresponding to the missing features on the mating parts based on the assembly relationship. If the mating feature is already marked in the generated mating part drawing and the marking content of the mating feature uniquely determines the machining requirements of the missing feature, the process ends; otherwise, proceed to S5, which includes: determining the contact surface of the missing feature on the part based on the position coordinates of the missing feature; finding the mating constraint containing the contact surface from the assembly relationship; taking another part in the mating constraint as the mating part and the contact surface of the other part in the mating constraint as the mating contact surface; extracting the features located on the mating contact surface from the process attribute set of the mating parts as the mating features; checking whether the generated mating part drawing contains the marking content of the mating feature. If it does, and the marking content of the mating feature contains the complete dimensions and tolerances of the missing feature, the process ends; otherwise, proceed to S5.
7. The method for generating drawings for furniture design according to claim 1, characterized in that, Based on the location of missing features, the expected region is determined, and blank candidate regions are generated around the expected region. The main reading axis of the projected view is determined, and the deviation of the centroid of each blank candidate region from the main reading axis is calculated. The annotation candidate region is determined by competition using a Voronoi diagram, including: determining mapping points in the projected view based on the location coordinates of the missing features; delineating the expected region with the mapping points as the center and based on the operation influence range corresponding to the processing operation information; identifying areas in the projected view that are not covered by visible geometric contours and do not contain annotations as available blank regions around the expected region; segmenting multiple rectangular regions in the available blank regions as blank candidate regions; performing principal component analysis on the coordinate points of visible geometric contours in the projected view and extracting the straight line corresponding to the direction of maximum variance as the main reading axis; calculating the vertical distance from the centroid of each blank candidate region to the main reading axis as the deviation; constructing a Voronoi diagram with the centroid of each blank candidate region as the generation point; converting the deviation into attention weights; performing weighted competition in the Voronoi diagram; and determining the blank candidate region with the largest area after weighted competition as the annotation candidate region.
8. The method for generating drawings for furniture design according to claim 7, characterized in that, The deviation is converted into attention weights, and weighted competition is performed in the Voronoi diagram. The blank candidate region with the largest area after weighted competition is determined as the label candidate region. This includes: taking the reciprocal of the deviation of each blank candidate region and normalizing it to obtain the attention weight of each blank candidate region; constructing a Voronoi diagram with the centroid of each blank candidate region as the generation point, and assigning the attention weight of each blank candidate region to the Voronoi cell in the Voronoi diagram where the corresponding generation point is located; in the Voronoi diagram, each Voronoi cell expands along the boundary to adjacent Voronoi cells, and the expansion speed is proportional to the attention weight. When adjacent Voronoi cells meet, the expansion stops, and the area of the Voronoi cell after the expansion stops is used as the occupied area after weighted competition; comparing the occupied areas of each Voronoi cell, the blank candidate region corresponding to the Voronoi cell with the largest occupied area is determined as the label candidate region.
9. The method for generating drawings for furniture design according to claim 1, characterized in that, Calculate the existing label density within the candidate label area. If the label density exceeds the preset density, adjust the label position to a blank area adjacent to the candidate label area with a label density lower than the preset density, and generate the label content for the missing feature. This includes: counting the number of labels within the candidate label area, obtaining the area of the candidate label area, and calculating the ratio of the number of labels to the area of the candidate label area as the existing label density; if the existing label density exceeds the preset density, traverse the available blank areas adjacent to the candidate label area, calculate the label density of the adjacent available blank areas, and select the adjacent available blank area with a label density lower than the preset density as the final label position; and generate the label content for the missing feature at the final label position.
10. A drawing generation system for furniture design, used to implement the drawing generation method for furniture design according to any one of claims 1-9, characterized in that, include: The data acquisition module is used to acquire the assembly relationships and process attribute sets of the target 3D model area; The view generation module is used to generate a projected view of the target 3D model area according to a preset scale and extract the visible geometric contours; The feature recognition module is used to extract processing operation information from the process attribute set, infer the geometric traces that the processing operation corresponding to the processing operation information should present, and if no geometric traces are found in the visible geometric contour, it is determined to be a missing feature and the location of the missing feature is recorded. The mating verification module is used to identify the mating features on mating parts that correspond to the missing features based on the assembly relationship. If the mating feature is marked in the generated mating part drawing and the marking content of the mating feature uniquely determines the processing requirements of the missing feature, the processing ends; otherwise, the position optimization module is executed. The location optimization module is used to determine the expected region based on the location of the missing features and generate blank candidate regions around the expected region, determine the main reading axis of the projected view, calculate the deviation of the centroid of each blank candidate region from the main reading axis, and use the Voronoi diagram to competitively determine the annotation candidate region. The annotation generation module is used to calculate the existing annotation density in the annotation candidate area. If the annotation density exceeds the preset density, the annotation position is adjusted to a blank area adjacent to the annotation candidate area and the annotation density is lower than the preset density, and the annotation content of the missing feature is generated.
