[go: up one dir, main page]

CN114896812A - Automatic typesetting method, equipment, storage medium and system for building block printing - Google Patents

Automatic typesetting method, equipment, storage medium and system for building block printing Download PDF

Info

Publication number
CN114896812A
CN114896812A CN202210640919.1A CN202210640919A CN114896812A CN 114896812 A CN114896812 A CN 114896812A CN 202210640919 A CN202210640919 A CN 202210640919A CN 114896812 A CN114896812 A CN 114896812A
Authority
CN
China
Prior art keywords
printing
jig
building block
building blocks
building
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210640919.1A
Other languages
Chinese (zh)
Other versions
CN114896812B (en
Inventor
陈昊
徐豪
王成昊
李承�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianqi Technology Co ltd
Original Assignee
Shenzhen Qianqi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianqi Technology Co ltd filed Critical Shenzhen Qianqi Technology Co ltd
Priority to CN202210640919.1A priority Critical patent/CN114896812B/en
Publication of CN114896812A publication Critical patent/CN114896812A/en
Application granted granted Critical
Publication of CN114896812B publication Critical patent/CN114896812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/18Manufacturability analysis or optimisation for manufacturability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Operations Research (AREA)
  • Strategic Management (AREA)
  • Pure & Applied Mathematics (AREA)
  • Economics (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Algebra (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Manufacture Or Reproduction Of Printing Formes (AREA)

Abstract

The invention discloses an automatic typesetting method, equipment, a storage medium and a system for building block printing. The automatic typesetting method for the building block printing mainly comprises the following steps: acquiring geometric data of the building blocks and the jig according to the input building block model; determining a jig corresponding to the printing surface of each building block according to the spatial relationship of the building blocks; dividing all the building block printing surfaces into at least one printing group according to the coplanar relation of the building block printing surfaces; and dividing all the printing groups into at least one jig typesetting according to the printing areas of the printing groups. The operator only needs to input building blocks printing surfaces and their pictures, the algorithm will process the loaded down with trivial details mode of putting and solve the scheduling problem, will collide with the detection, connect process automation such as detection, reduce manual operation's incident, greatly reduce the typesetting time that building blocks printed, reduce the work number of times of printer, raise the efficiency and reduce cost.

Description

Automatic typesetting method, equipment, storage medium and system for building block printing
Technical Field
The invention relates to a wireless communication technology, in particular to an automatic typesetting method, equipment, a storage medium and a system for building block printing.
Background
The existing building block model assembling design method can automatically generate a building block model by using an algorithm, an operator only needs to input pictures, the algorithm can solve the problems of complicated building block assembling and the like, and the related technical scheme can refer to the prior application CN202111049606.0 of the applicant. When printing different building blocks pictures simultaneously, the operator need rely on experience or manual operation, tries various of building blocks and tool and puts, finds a collision-free, interconnect, utilizes the tool to print the building blocks mode of putting of scope as far as possible. These operations take up a large part of the time for printing the blocks and the operator cannot always find an excellent way of laying. Therefore, it is desirable to provide a
Disclosure of Invention
The invention needs to overcome the defects of the prior art, and provides an automatic typesetting method, equipment, a storage medium and a system for building block printing.
In order to achieve the above object, according to a first aspect of the present invention, there is provided an automatic layout method for block printing, comprising:
step 1: acquiring geometric data of the building blocks and the jig according to the input building block model;
step 2: determining a jig corresponding to each building block printing surface according to the spatial relation of the building blocks, wherein the building block printing surface is a to-be-printed area on the surface of the building block;
and step 3: dividing all the building block printing surfaces into at least one printing group according to the coplanar relation of the building block printing surfaces;
and 4, step 4: and dividing all the printing groups into at least one jig typesetting according to the printing areas of the printing groups, wherein the printing areas are the sum of the areas of the printing surfaces of all the building blocks in the printing groups.
Further, in step2, through the connection relation of exhaustive building blocks and jigs, a jig matched with the printing surface of the building blocks is found.
Further, in step2, if there is at least one placing mode satisfying the following condition, the corresponding building block printing surface can be printed on the jig by the exhaustive building block placing mode on any jig:
the plane of the building block printing surface is parallel to the jig printing surface, and the normal distance is smaller than a threshold value;
the printing surface of the building block is within the printing range of the corresponding jig;
the building blocks do not collide with the jig.
Further, in step3, two-by-two judgment is carried out on all building block printing faces, if the two building block printing faces are parallel and the normal distance is smaller than the threshold value, the two building block printing faces are considered to be printed in a coplanar mode, and the two building block printing faces are divided into the same printing group. Or if the two building block printing surfaces are parallel, the normal distance is smaller than the threshold value, and a group of corresponding polygons are in contact, the two building block printing surfaces are considered to be required to be printed in a coplanar manner, and the two building block printing surfaces are divided into the same printing group.
Further, the step4 comprises the following steps:
step 41, forming a printing queue according to the size of the total printing area of the printing groups;
step 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placing condition of the printing group exists, if so, entering step 43, and if not, entering step 44;
step 43, putting the printing group into the corresponding tool example, and entering step 47;
step 44, adding a new tool example for the tool, and judging whether the tool example meets the placing condition, if yes, entering step 45, and if not, entering step 46;
step 45, placing the printing group into the jig example, and entering step 47;
step 46, dividing the printing group into a plurality of printing groups only containing a single building block printing surface, adding the printing groups into the printing queue to be placed again, and returning to the step 41;
step 47, if the printing group which is not placed is zero, the step 48 is entered, otherwise, the step 42 is returned to;
and step 48, recording the number of the jig examples of the jigs and the printing groups placed on the jigs.
Further, in step 42, the placing conditions are:
all the printing surfaces of the building blocks in the printing group do not exceed the range of the printing surfaces of the jig;
all the building blocks in the printing group do not collide with the jig examples and existing building blocks in the jig examples;
all building blocks in this printing group all belong to same whole with the tool.
Further, when judging whether all the building blocks in a certain printing group belong to the same whole with the jig, pairwise comparison is carried out on connecting points between two building blocks or between the jig and the building blocks, and if the two connecting points are parallel, the distance of straight lines where the two connecting points are located is smaller than a threshold value, and the two connecting points are provided with mutually meshed parts, the fact that the two building blocks or the building blocks and the jig are connected is judged. The size of the threshold is not limited by the present application, and is typically 0.01 times the Legao unit or 0.004mm in the preferred embodiment.
Further, in step 42, if the printing group has a plurality of placement modes satisfying the placement conditions in the jig, the placement mode having the smallest reference point from the printing surface of the jig in the abscissa is selected, and if there are a plurality of placement modes having the smallest reference points, the placement mode having the smallest reference point from the printing surface of the jig in the ordinate is selected.
In a second aspect of the present invention, there is provided an automatic typesetting apparatus for block printing, the apparatus comprising:
the geometric calculation module is used for acquiring geometric data of the building blocks and the jigs;
the jig matching module is used for determining a jig corresponding to the printing surface of each building block;
the printing group dividing module is used for dividing all the building block printing surfaces into at least one printing group;
and the automatic typesetting module is used for dividing all the printing groups into at least one jig typesetting.
In a third aspect of the present invention, there is also provided a storage medium storing one or more programs for implementing the automatic layout method for block printing.
In a fourth aspect of the present invention, there is also provided a system comprising at least one processor and a memory, the memory storing one or more programs which, when executed by the processor, implement the method for automatic composition of block prints.
The automatic typesetting method, the equipment, the storage medium and the system for building block printing have the following beneficial effects that: the operator only needs to input building blocks printing surfaces and their pictures, the algorithm will process the loaded down with trivial details mode of putting and solve the scheduling problem, will collide with the detection, connect process automation such as detection, reduce manual operation's incident, greatly reduce the typesetting time that building blocks printed, reduce the work number of times of printer, raise the efficiency and reduce cost.
Drawings
FIG. 1 is a general flow chart of the automatic typesetting method for block printing according to the present invention;
FIG. 2 is a flowchart of the layout of the jig shown in FIG. 1;
FIG. 3 is a block diagram of an automatic composition apparatus of the present invention;
FIG. 4 is a block diagram of a system for implementing an automatic typesetting method for block printing according to the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the following description is only one embodiment of the present invention, and other embodiments can be obtained according to the present embodiment without inventive efforts by those skilled in the art.
FIG. 1 is a general flowchart of the automatic typesetting method for block printing according to the present invention. The technical solution in the figure can be implemented in the form of a computer program, and is run in any computing facility with computing function, such as a personal computer, a cloud server, and the like. The method comprises the following specific steps:
step 1: and acquiring geometric data of the building blocks and the jig according to the input building block model.
The building block model is a set of one or more building blocks, and describes the type of the building blocks, the number of various building blocks, the color of the building blocks and the relative position relation among the building blocks. The kind of building block is specified by its kind identifier. The block type identifier is a unique name that each type of block has. The name specifies the geometric data of the block, including the shape of the block, the block print surface, the connection points of the block, the collision volume, etc. The shape of the building block is formed by splicing a plurality of triangles and quadrangles, and the surface of one building block is represented. The triangle and the quadrangle are respectively represented by three and four three-dimensional vectors. The block print face data describes a rectangular area in three-dimensional space for printing a picture, the rectangular area corresponding to one or more polygons to be printed on a surface of the block. The rectangular area is represented using one origin, one lateral direction, one longitudinal direction, and a total of three-dimensional vectors. The block connection point data describes the origin location, direction, length, and type of connection point. The direction of the connection point is divided into a main direction and an auxiliary direction, and the main direction and the auxiliary direction are perpendicular to each other and are all represented by a three-dimensional vector. The collision volume data describes one or more convex geometric volumes in three-dimensional space for determining whether a collision between building blocks occurs. The jig can be regarded as a special building block and also has data of shapes, connection points and collision bodies. The jig printing surface is rectangular as the building block printing surface, but is different from the building block, and the jig printing surface describes the maximum printing range of the printer on the jig. For example, all the data may be stored in a form of a file in an external storage device of the computer, and imported into the memory of the computer in this step.
In this application, the connection point is at least one line segment. This type of connection is called a "connection point" because the connection of a block to a block is more like a "point" to "point" connection from a real point of view. However, in a computer program, at least one point and one vector are required to calculate whether two blocks are connected. In a computer program, the connection points may be represented by line segments. The parallelism of the line segments is considered to be the parallelism of the two connection points. Step 2: and determining a jig corresponding to each building block printing surface according to the spatial relation of the building blocks, wherein the building block printing surface is an area to be printed on the surface of the building block.
In this step, for each block printing surface to be printed, for one example of each jig, four transformation matrices of the block are generated for each connection point C1 of the block corresponding to the block printing surface and each connection point C2 of the jig example. These four transformation matrices transform the building blocks to the necessary state of connection points C1 and C2, giving C1 and C2 the possibility of connection. Illustratively, four transformation matrices may have the point of connection C1 co-located with the origin of point of connection C2, with their principal directions co-linear and co-directional. The first transformation matrix is such that the two secondary directions are co-linear and co-directional. The other three matrixes are obtained by respectively rotating 90 degrees, 180 degrees and 270 degrees around the main direction on the basis of the first matrix. And judging whether the connection points C1 and C2 have the meshing structure or not by using the connection type of the building blocks, and if so, connecting the connection points. Whether the two collides is judged to the collision body data that uses building blocks and tool, uses the printing face data of building blocks and tool to judge whether building blocks print the face and tool and print the face coplane, whether is in tool printing range. If tie point C1 is connected with C2, building blocks and tool do not have the collision, and building blocks print the face and the tool printing face coplane and building blocks print the face and be in printing the within range, then building blocks with the kind of tool matches.
Step 3: and dividing all the building block printing surfaces into at least one printing group according to the coplanar relation of the building block printing surfaces.
For every two combinations of each building block printing surface to be printed, judging whether the types of the two building block printing surfaces are the same, judging whether rectangles of the two building block printing surfaces are coplanar, and judging whether polygons corresponding to the two building block printing surfaces are in contact. The condition for two polygons to touch is: there is a set of edges that are collinear and overlap by a distance greater than some threshold. When the spatial relationship between two objects is compared in a computer, an error range must be set first, and the value of the error depends on the calculation requirements of the computer. The threshold value of the present invention is, for example, 0.01 leh units, and one leh unit is 0.4 mm. In some cases, the threshold may be modified for computational convenience. Illustratively, the two block printing surfaces are printing surface F1 and printing surface F2, and if there is one side of a polygon corresponding to printing surface F1 and there is one side of a polygon corresponding to printing surface F2, so that the two sides are parallel and coincide, the two block printing surfaces are considered to be in contact. If the printing surfaces of the two building blocks are the same in type, coplanar and contacted, the printing surfaces of the two building blocks belong to the same printing group. Obviously, this relationship is transitive, and if block print face F1 and block print face F2 belong to the same print group, and block print face F2 and block print face F3 belong to the same print group, then F1 and F3 belong to the same print group. This relationship and its transitivity can be used to build a graph data structure where each node represents a block print, and each edge represents the block prints at both ends of the edge in the same print group. After the graph data structure is built, all connected components in the graph represent the divided print groups.
Illustratively, the building blocks in the model can be grouped according to the requirements of a model designer, and the relative positions between the blocks can be represented in a Scene Graph (Scene Graph) mode. The scene graph is actually a Rooted Tree (Rooted Tree). To calculate the spatial transformation matrix of any packet, only the transformation matrices on the paths from the root node of the scene graph to the packet need to be sequentially multiplied.
Step 4: and dividing all the printing groups into at least one jig typesetting according to the printing areas of the printing groups, wherein the printing areas are the sum of the areas of the printing surfaces of all the building blocks in the printing groups.
The data of building blocks guarantee that the same tool can be used to print to the building blocks printing surface in same printing group. The connection points of the building block printing surface refer to all the connection points of the building block corresponding to the building block printing surface. All the connection points in one printing group refer to the connection points of the printing surfaces of all the building blocks in the printing group. The sum of the rectangular areas of the printing groups refers to the sum of the rectangular areas of the printing surfaces of all the building blocks in the printing groups. In this step, a fixture instance is created for all fixture types at initialization. The tool example is based on the expression of object-oriented programming technology (OOP), and represents an instantiation object of FixtureInstance class in a computer program. All printing groups are formed into a queue according to the sequence from large to small of the sum of the rectangular areas, and the head area of the queue is the largest. For each printing group G1 from the beginning to the end of the queue, for each connection point C3 in the printing group G1, for the jig type K1 corresponding to the printing group G1, for each jig instance T1 of the jig type K1, for each connection point C4 of the jig instance T1, for the connection points C3 and C4, four matrices are generated according to the transformation matrix generation method described in step S120, and for each matrix P in the four matrices, after the printing group is transformed to the corresponding position using the matrix P, the following four conditions are all satisfied:
there is a block print face F4 in print group G1, a connection point C5 for the block corresponding to F4, a connection point C6 in fixture example T1, and a connection point C5 connected to C6.
The blocks corresponding to the printing surfaces of each block in the printing group G1 do not collide with each block in the printing layout corresponding to the jig example T1 and T1.
Each brick print face of print group G1 is coplanar with the jig print face of jig example T1.
The print face of each brick in print group G1 is within the print face of the jig of example T1.
Then tool instance T1 is deemed to be able to place print group G1 in matrix P. Finding the optimal placement from the placements of all print groups G1 on jig instance T1, placing print group G1 in the print layout of jig instance T1, and skipping other jig instances of jig type K1, finding the print layout for the next print group in the queue. The optimal placement mode is that the original point of the printing surface of the printing group G1 and the printing surface of the jig example T1 is closest to the transverse direction of the printing surface of the jig example T1, or the original point of the printing group G1 and the printing surface of the jig example T1 is not only closest to the transverse direction of the printing surface of the jig example T1 but also is closest to the longitudinal direction of the printing surface of the jig example T1. Wherein, building blocks print the face and be in the printing scope of tool printing face, mean behind the rectangle projection with building blocks printing face to tool printing face place plane, building blocks printing face rectangle becomes the subset of tool printing face rectangle. If all of the four conditions are not all true for the combination of all the connection points of print group G1 and all the connection points of all the instances of fixture type K1, fixture instance T1 is deemed to be unable to place print group G1 and a new fixture instance T2 is generated for fixture type K1. If jig example T2 can place print group G1, then print group G1 is added to jig example T2 using the optimal placement method to form a new print layout. If jig example T2 cannot place print group G1, print group G1 is split into a plurality of print groups containing only a single block printing surface, and the split plurality of print groups are added to the tail of the queue. Step S140 is executed until all print groups in the queue are added to a certain print layout.
In a particular embodiment, step4 includes the steps of:
and step 41, forming a printing queue according to the sum of the printing areas of the printing groups from large to small.
And 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placing condition of the printing group exists, if so, entering a step 43, and if not, entering a step 44. The placing conditions are as follows: all the printing surfaces of the building blocks in the printing group do not exceed the range of the printing surfaces of the jig; all the building blocks in the printing group do not collide with the jig examples and existing building blocks in the jig examples; all building blocks in this printing group all belong to same whole with the tool. When judging whether all building blocks in a certain printing group belong to the same whole with the tool, carry out two liang of comparisons to the tie point between two building blocks or between tool and the building block, if two tie points are parallel, the distance of two tie point place straight lines is less than the threshold value and two tie points have the position of intermeshing, then judge that two building blocks or building block and tool have the relation of connection. In the present invention, the connection point is actually a line segment. And under the condition that the two line segments are parallel, actually judging whether the distance between the straight lines of the two line segments is smaller than a threshold value. If less than the threshold, the two segments are collinear. In addition, a condition is required: under the condition that the two segments are collinear, the extent of overlap of the segments should exceed some variable threshold. The variable threshold may not take the same value in different instances, and typically we use a threshold of-1 happy unit.
And 43, putting the printing group into the corresponding jig example, and entering step 47.
And 44, adding a new jig example for the jig, judging whether the jig example meets the placing condition, if so, entering a step 45, and if not, entering a step 46.
Step 45, place the print group into the fixture instance, and proceed to step 47.
And step 46, splitting the printing group into a plurality of printing groups only containing the printing surface of the single building block, adding the printing groups into the printing queue to be placed again, and returning to the step 41.
Step 47, if the print group not placed is zero, step 48 is entered, otherwise step 42 is returned to.
And step 48, recording the number of the jig examples of the jigs and the printing groups placed on the jigs. The embodiment uses pre-marked building block data, calculates the jig type corresponding to each building block printing surface according to the input building block model, divides the printing groups according to coplanarity and contact relation of the building block printing surfaces, generates jig typesetting, avoids most of the problems of collision, disconnection, jig space waste and the like which possibly occur, improves the quality and efficiency of building block mapping printing, and has beneficial effects on the production of the building block model.
The building block picture is a layer of pigment covering the surface of the building block. In this application, a building block map is understood to be a bitmap and the correspondence of bitmap pixels to the surface of the building block model. V is the building block model surface, then the building block map can be expressed as the following function:
φ(p)=(u,v)
s(u,v)=C
wherein p ∈ V, (u, V) ∈ [0,1 ]] 2 ,∈[0,1] 3 The vertices of the building block model, the (uv) coordinates of the map space, and the coordinates of the color space, respectively. Phi is called uv mapping function and S denotes the sampling method of the picture.
FIG. 3 is a block diagram of an automatic typesetting device for block printing according to the present invention. The device is used for executing the automatic typesetting method for the building block printing provided by any embodiment. The device comprises a geometric calculation module, a printing grouping module, a jig matching module and an automatic typesetting module.
And the geometric calculation module is used for acquiring geometric data of the building blocks and the jigs. This module uses position, principal direction, vice direction, length and the tie point type of building blocks tie point to judge whether be connected between building blocks and the building blocks, uses protruding geometry to judge whether bump between building blocks and the building blocks.
The jig matching module is used for determining a jig corresponding to each building block printing surface. The module exhaustively arranges the building blocks and a certain jig, and judges whether the printing surface of the building blocks can be used by the jig for printing.
The printing group dividing module is used for dividing all the building block printing surfaces into at least one printing group. The module exhales every two combinations of the building block printing surfaces, determines coplanarity and contact relation of the building block printing surface combinations, establishes a graph data structure by using the relation, and divides printing groups by using connected components of the graph data structure.
The automatic typesetting module is used for dividing all printing groups into at least one jig typesetting. The module uses a greedy strategy based on the area size of the printing surface to sequentially divide the printing groups into one or more jig examples to form the printing typesetting.
The invention also provides a storage medium which stores one or more programs for implementing the automatic typesetting method for the building block printing. The method comprises the following steps: determining a printing jig corresponding to the printing surface of each building block according to the spatial relation of the building blocks; dividing all the building block printing surfaces into a plurality of printing groups according to the coplanarity and the contact relation of the building block printing surfaces; and dividing all the printing groups into a plurality of printing jig typesetting according to the sequence of the printing areas of the printing groups from large to small by using a greedy strategy. The invention provides a storage medium containing computer-executable instructions, which are not limited to the method operations described above, and can also execute the related operations in the automatic typesetting method for building block printing provided by any embodiment of the invention.
Fig. 4 is a block diagram of a system for implementing an automatic typesetting method for block printing according to the present invention, and the apparatus includes a processor 31, an output device 32, an input device 33, and a memory 34. The number of the processors 31 in the device may be one or more, and one processor 31 is taken as an example in fig. 3; the processor 31, the memory 34, the input device 33 and the output device 32 in the apparatus may be connected by a bus or other means, as exemplified by a bus in fig. 4.
The memory 34 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the automatic typesetting method for block printing according to the embodiment of the present invention. The processor 31 executes various functional applications of the apparatus and data processing by executing software programs, instructions and modules stored in the memory 34, that is, the automatic typesetting method for block printing is realized.
The memory 34 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 34 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 34 may further include memory located remotely from the processor 31, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 33 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus/terminal/server. The output device 32 may include a display device such as a display screen.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the automatic composition device for building block printing, the included units and modules are only divided according to the functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. An automatic typesetting method for building block printing is characterized by comprising the following steps:
step 1: acquiring geometric data of the building blocks and the jig according to the input building block model;
step 2: determining a jig corresponding to each building block printing surface according to the spatial relation of the building blocks, wherein the building block printing surface is a to-be-printed area on the surface of the building block;
and step 3: dividing all the building block printing surfaces into at least one printing group according to the coplanar relation of the building block printing surfaces;
and 4, step 4: and dividing all the printing groups into at least one jig typesetting according to the printing areas of the printing groups, wherein the printing areas are the sum of the areas of the printing surfaces of all the building blocks in the printing groups.
2. The automatic typesetting method for building block printing according to claim 1, characterized in that in step2, the placing modes of the exhaustive building blocks on any jig are considered, and if at least one placing mode meets the following conditions, the corresponding printing surface of the building block is considered to be printable on the jig:
the plane of the building block printing surface is parallel to the jig printing surface, and the normal distance is smaller than a threshold value;
the printing surface of the building block is within the printing range of the corresponding jig;
the building blocks do not collide with the jig.
3. The automatic typesetting method for building block printing according to claim 2, characterized in that in step3, two-by-two judgment is performed on all building block printing faces, if two building block printing faces are parallel, the normal distance is smaller than the threshold value and the polygons corresponding to the building block printing faces are in contact, then it is considered that the two building block printing faces need to be printed in the same plane, and the two building block printing faces are divided into the same printing group.
4. The automatic typesetting method for building block printing according to claim 1, wherein the step4 comprises the following steps:
step 41, forming a printing queue according to the size of the total printing area of the printing groups;
step 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placing condition of the printing group exists, if so, entering step 43, and if not, entering step 44;
step 43, putting the printing group into the corresponding tool example, and entering step 47;
step 44, adding a new tool example for the tool, and judging whether the tool example meets the placing condition, if yes, entering step 45, and if not, entering step 46;
step 45, placing the printing group into the jig example, and entering step 47;
step 46, dividing the printing group into a plurality of printing groups only containing a single building block printing surface, adding the printing groups into the printing queue to be placed again, and returning to the step 41;
step 47, if the printing group which is not placed is zero, the step 48 is entered, otherwise, the step 42 is returned to;
and step 48, recording the number of the jig examples of the jigs and the printing groups placed on the jigs.
5. The automatic typesetting method for building block printing according to claim 4, wherein in step 42, the placing conditions are:
all the printing surfaces of the building blocks in the printing group do not exceed the range of the printing surfaces of the jig;
all the building blocks in the printing group do not collide with the jig examples and existing building blocks in the jig examples;
all building blocks in this printing group all belong to same whole with the tool.
6. The automatic typesetting method for building block printing according to claim 5, characterized in that when judging whether all the building blocks in a certain printing group belong to the same whole with the jig, the connection points between two building blocks or between the jig and the building blocks are compared pairwise, if the two connection points are parallel, the distance between the straight lines of the two connection points is less than a threshold value and the two connection points have mutually meshed parts, the two building blocks or the building blocks and the jig are judged to have a connection relationship.
7. The automatic composition method for building block printing according to claim 4, wherein in step 42, if the printing group has a plurality of placement modes satisfying the placement conditions in the jig, the placement mode with the smallest reference point from the printing surface of the jig on the abscissa is selected, and if the plurality of placement modes with the smallest reference points exist, the placement mode with the smallest reference point from the printing surface of the jig on the ordinate is selected.
8. An automatic composing apparatus for block printing, comprising:
the geometric calculation module is used for acquiring geometric data of the building blocks and the jigs;
the jig matching module is used for determining a jig corresponding to the printing surface of each building block;
the printing group dividing module is used for dividing all the building block printing surfaces into at least one printing group;
and the automatic typesetting module is used for dividing all the printing groups into at least one jig typesetting.
9. A storage medium storing one or more programs for implementing the automatic composition method for block printing according to claim 1.
10. A system comprising at least one processor and memory storing one or more programs which, when executed by the processor, implement the method of automatic composition of block prints according to claim 1.
CN202210640919.1A 2022-06-08 2022-06-08 Automatic typesetting method, equipment, storage medium and system for building block printing Active CN114896812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210640919.1A CN114896812B (en) 2022-06-08 2022-06-08 Automatic typesetting method, equipment, storage medium and system for building block printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210640919.1A CN114896812B (en) 2022-06-08 2022-06-08 Automatic typesetting method, equipment, storage medium and system for building block printing

Publications (2)

Publication Number Publication Date
CN114896812A true CN114896812A (en) 2022-08-12
CN114896812B CN114896812B (en) 2024-08-02

Family

ID=82728054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210640919.1A Active CN114896812B (en) 2022-06-08 2022-06-08 Automatic typesetting method, equipment, storage medium and system for building block printing

Country Status (1)

Country Link
CN (1) CN114896812B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024255773A1 (en) * 2023-06-12 2024-12-19 魔芯(湖州)科技有限公司 Customized toy and user interaction method therefor, and printing method and 3d printer

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070063997A1 (en) * 2003-05-20 2007-03-22 Ronny Scherer Method and system for manipulating a digital representation of a three-dimensional object
US20070262984A1 (en) * 2004-06-17 2007-11-15 Lego A/S Automatic Generation of Building Instructions for Building Block Models
CN101675458A (en) * 2007-03-16 2010-03-17 乐高公司 Automatic generation of building instructions for building element models
CN108460399A (en) * 2017-12-29 2018-08-28 华南师范大学 A kind of child building block builds householder method and system
CN109408001A (en) * 2018-08-22 2019-03-01 先临三维科技股份有限公司 3D printing method, apparatus, 3D printing equipment and the storage medium of multi-model
CN110489794A (en) * 2019-07-15 2019-11-22 武汉大学 A construction method of LEGO-like building block plane drawings oriented to simple strokes
CN110992472A (en) * 2019-12-06 2020-04-10 广东邦宝益智玩具股份有限公司 Building block 3D model intelligent building system construction method
CN113742808A (en) * 2021-09-08 2021-12-03 深圳千帜科技有限公司 Design method of spliced building block model

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070063997A1 (en) * 2003-05-20 2007-03-22 Ronny Scherer Method and system for manipulating a digital representation of a three-dimensional object
US20070262984A1 (en) * 2004-06-17 2007-11-15 Lego A/S Automatic Generation of Building Instructions for Building Block Models
CN101675458A (en) * 2007-03-16 2010-03-17 乐高公司 Automatic generation of building instructions for building element models
CN108460399A (en) * 2017-12-29 2018-08-28 华南师范大学 A kind of child building block builds householder method and system
CN109408001A (en) * 2018-08-22 2019-03-01 先临三维科技股份有限公司 3D printing method, apparatus, 3D printing equipment and the storage medium of multi-model
CN110489794A (en) * 2019-07-15 2019-11-22 武汉大学 A construction method of LEGO-like building block plane drawings oriented to simple strokes
CN110992472A (en) * 2019-12-06 2020-04-10 广东邦宝益智玩具股份有限公司 Building block 3D model intelligent building system construction method
CN113742808A (en) * 2021-09-08 2021-12-03 深圳千帜科技有限公司 Design method of spliced building block model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024255773A1 (en) * 2023-06-12 2024-12-19 魔芯(湖州)科技有限公司 Customized toy and user interaction method therefor, and printing method and 3d printer

Also Published As

Publication number Publication date
CN114896812B (en) 2024-08-02

Similar Documents

Publication Publication Date Title
JP2024050711A5 (en)
CN111444573B (en) Ship symmetric segment model generation method and device, storage medium and terminal
CN111754579A (en) Method and device for determining external parameters of multi-view camera
Lee et al. Closed-form optimal two-view triangulation based on angular errors
CN110689492A (en) Image edge smoothing method and device
CN114896812A (en) Automatic typesetting method, equipment, storage medium and system for building block printing
CN118060981B (en) Curved surface polishing track planning method and device and electronic equipment
CN113628343B (en) Three-dimensional grid combination processing method and device and storage medium
CN115194931A (en) Planning method, device and equipment for concrete 3D printing path and storage medium
CN114255171B (en) Method and device for calculating similar legend conversion relation
EP3913540B1 (en) A convolution operator system to perform concurrent convolution operations
CN118799364A (en) Point cloud registration method, device, equipment, medium and product
CN110689594A (en) A method and apparatus for determining discrete lines of a triangular grid
CN111488648B (en) Automatic drawing method, system, equipment and storage medium for ship structure diagram
CN115891175A (en) Model cutting and merging method, device, 3D printer and readable storage medium
US20240394854A1 (en) Method and system for rectifying image
CN112052641B (en) Method and system for generating large-scale integrated circuit layout unstructured grid eccentric midpoint
CN110111249A (en) A kind of acquisition of tunnel inner wall picture mosaic image and generation method and system
CN112848312B (en) Method and device for detecting three-dimensional model object, computer equipment and storage medium
CN119205980A (en) Method, apparatus, device and storage medium for image rendering
CN116629193A (en) Wiring method, device, equipment and storage medium for integrated circuit
CN115330836A (en) Laser cleaning track compression method, device, equipment and storage medium
CN120472115B (en) Large-scale scene face-reduction optimization method, device and equipment based on clustering algorithm
CN120526086B (en) Method and system for generating quadrilateral mesh of geometric models based on GPU parallelism
CN114445495B (en) A point-surface optimization method, terminal device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant