[go: up one dir, main page]

CN114896812B - 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
CN114896812B
CN114896812B CN202210640919.1A CN202210640919A CN114896812B CN 114896812 B CN114896812 B CN 114896812B CN 202210640919 A CN202210640919 A CN 202210640919A CN 114896812 B CN114896812 B CN 114896812B
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.)
Active
Application number
CN202210640919.1A
Other languages
Chinese (zh)
Other versions
CN114896812A (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

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 building block printing mainly comprises the following steps: obtaining geometric data of building blocks and jigs according to the input building block model; determining a jig corresponding to each building block printing surface according to the spatial relationship of the building blocks; dividing all building block printing surfaces into at least one printing group according to the coplanarity 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 the building block printing surface and the picture of the building block, the algorithm solves the problems of complex placement mode, and the like, the processes of collision detection, connection detection and the like are automated, the event of manual operation is reduced, the typesetting time of building block printing is greatly shortened, the working times of the printer are reduced, and the efficiency and the cost are improved.

Description

Automatic typesetting method, equipment, storage medium and system for building block printing
Technical Field
The present invention relates to wireless communication technology, and in particular, to a method, an apparatus, a storage medium, and a system for automatic typesetting 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 related technical schemes can be referred to a prior application CN202111049606.0 of the inventor. When different building block maps are printed at the same time, an operator needs to try various placement modes of the building blocks and the jigs through experience or manual operation, so as to find a building block placement mode without collision and interconnection, and the printing range of the jigs is utilized as much as possible. These operations take up most of the time for printing the building blocks and the operator cannot always find an excellent way of placement.
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 printing building blocks.
In order to achieve the above object, according to a first aspect of the present invention, there is provided an automatic typesetting method for printing building blocks, comprising:
step 1: obtaining geometric data of building blocks and jigs according to the input building block model;
step 2: according to the spatial relationship of the building blocks, determining a jig corresponding to each building block printing surface, wherein the building block printing surface is a region to be printed on the surface of the building block;
Step 3: dividing all building block printing surfaces into at least one printing group according to the coplanarity relation of the building block printing surfaces;
Step 4: 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 all building block printing surfaces in the printing groups.
Further, in step 2, the jig matching with the printing surface of the building block is found by exhausting the connection relation between the building block and the jig.
Further, in step 2, the layout of the building blocks on any jig is exhausted, and if at least one layout meets the following conditions, the corresponding printing surface of the building blocks is considered to be printed 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 the threshold value;
The printing surface of the building blocks is in the printing range of the corresponding jig;
The building blocks do not collide with the jig.
Further, in step 3, all the building block printing surfaces are judged in pairs, if the two building block printing surfaces are parallel and the normal distance is smaller than the threshold value, the two building block printing surfaces are considered to need to be printed in a coplanar manner, and the two building block printing surfaces 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 need to be printed in a coplanar manner, and the two building block printing surfaces are divided into the same printing group.
Further, the step4 includes the steps of:
Step 41, forming a printing queue from large to small according to the sum of printing areas of the printing groups;
step 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placement condition of the printing group exists, if so, entering step 43, and if not, entering step 44;
Step 43, putting the printing group into a corresponding jig example, and entering step 47;
step 44, adding a new jig example for the jig, judging whether the jig example meets the placement 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, splitting the printing group into a plurality of printing groups only comprising single building block printing surfaces, adding the printing groups into a printing queue to be placed again, and returning to step 41;
Step 47, if the unset print group is zero, go to step 48, otherwise return to step 42;
Step 48, record the number of jig examples of the jigs and the printing groups already placed on the jigs.
Further, in step 42, the placement conditions are:
all building blocks in the printing group are not beyond the range of the printing surface of the jig;
All the building blocks in the printing group do not collide with the existing building blocks in the jig example;
All building blocks in the printing group and the jig belong to the same whole.
Further, when judging whether all the building blocks in a certain printing group and the jig belong to the same whole, the two building blocks or the connecting points between the jig and the building blocks are compared pairwise, and if the two connecting points are parallel, the distance of the straight line 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 two building blocks or the building blocks and the jig are judged to have a connection relation. The application is not limited to the size of the threshold, and in a preferred embodiment typically takes the form of 0.01 times the Legao unit or 0.004mm.
Further, in step 42, if the print set has a plurality of placement modes satisfying the placement conditions in the jig, a placement mode with the smallest reference point of the print surface of the jig on the abscissa is selected, and if there are a plurality of placement modes with the smallest reference point, a placement mode with the smallest reference point of the print surface of the jig on the ordinate is selected.
In a second aspect of the present invention, there is also provided an automatic typesetting apparatus for printing building blocks, the apparatus comprising:
the geometric calculation module is used for obtaining geometric data of the building blocks and the jig;
the jig matching module is used for determining a jig corresponding to each building block printing surface;
The printing group dividing module is used for dividing all 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 typesetting method of building block printing.
In a fourth aspect of the present invention, there is also provided a system comprising at least one processor and a memory for storing one or more programs which when executed by the processor implement an automatic typesetting method for printing of said building blocks.
The automatic typesetting method, equipment, storage medium and system for building block printing have the following beneficial effects: the operator only needs to input the building block printing surface and the picture of the building block, the algorithm solves the problems of complex placement mode, and the like, the processes of collision detection, connection detection and the like are automated, the event of manual operation is reduced, the typesetting time of building block printing is greatly shortened, the working times of the printer are reduced, and the efficiency and the cost are improved.
Drawings
FIG. 1 is a general flow chart of an automatic typesetting method for building block printing of the present invention;
FIG. 2 is a flow chart of the jig composition of FIG. 1;
Fig. 3 is a block diagram of an automatic typesetting apparatus of the present invention;
fig. 4 is a block diagram of a system for implementing the automatic typesetting method of building block printing of the present invention.
Detailed Description
The technical solutions 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 technical solutions of the present invention or the prior art, the following description will make a brief introduction to the drawings used in the description of the embodiments or the prior art. It is obvious that the following description is only one embodiment of the present invention, and that other embodiments may be obtained according to the present embodiment without inventive effort by those skilled in the art.
Fig. 1 is a general flow chart of the automatic typesetting method of building block printing of the present invention. The technical solution in the figure can be implemented in the form of a computer program, and can be run in any computing facility with computing functions, such as a personal computer, a cloud server and the like. The method comprises the following specific steps:
step1: and obtaining geometric data of the building blocks and the jig according to the input building block model.
The building block model is a collection of one or more building blocks describing the kinds of building blocks, the number of the various kinds of building blocks, the colors of the building blocks and the relative positional relationship between the building blocks. The kind of building blocks is specified by its kind identifier. The building block type identifier is a unique name of each type of building block. The name specifies the geometric data of the building block, including the shape of the building block, the printing surface of the building block, the connection point of the building block, the collision body, etc. The shape of the building block is formed by splicing a plurality of triangles and quadrilaterals, and the surface of one building block is shown. The triangle and quadrangle are respectively represented by three and four three-dimensional vectors. The building block print surface 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 a building block. The rectangular region is represented using one origin, one lateral direction, one longitudinal direction, and three-dimensional vectors in total. Building block junction data describes the origin position, direction, length, and type of junction. The direction of the connection point is divided into a main direction and a secondary direction, and the main direction and the secondary direction are mutually perpendicular and are all represented by a three-dimensional vector. The collision volume data describes convex geometry in one or more three-dimensional spaces for determining whether a collision between bricks has occurred. The jig can be regarded as a special building block and also has shape, connection points and collision volume data. The jig printing surface is rectangular as the building block printing surface, but different from the building blocks, the jig printing surface describes the maximum printing range of the printer on the jig. Illustratively, all of the data described above may be stored in the form of files on a computer external storage device, which are imported into the computer memory in this step.
In the present application, the connection point is at least one line segment. Since the building blocks are more like "point" to "point" connections from a real point of view, such connection structures are referred to as "connection points". However, in a computer program, at least one point and one vector are needed to calculate whether two blocks are connected. In the computer program, the connection points may be represented by line segments. The parallelism of the line segments is considered as the parallelism of the two connection points. Step2: according to the spatial relationship of the building blocks, the jig corresponding to each building block printing surface is determined, and the building block printing surface is the area to be printed on the surface of the building block.
In this step, for each building block printing face to be printed, for one example of each jig, four transformation matrices of the building blocks are generated for each connection point C1 of the building block corresponding to the building block printing face and for each connection point C2 of the jig example. These four transformation matrices transform the building blocks to the necessary states for connection of connection points C1 and C2, giving C1 and C2 the possibility of connection. Illustratively, the four transformation matrices may have the origin of the connection point C1 and the connection point C2 in the same position, and the two principal directions are collinear and in the same direction. The first transformation matrix makes the two sub-directions collinear and co-directional. The other three matrices are respectively rotated 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 types of the building blocks, and if so, connecting the two connection points. And judging whether the two are collided by using collision volume data of the building blocks and the jig, and judging whether the printing surface of the building blocks is coplanar with the printing surface of the jig or is in the printing range of the jig by using printing surface data of the building blocks and the jig. If the connection point C1 is connected with the C2, the building blocks are not collided with the jig, the printing surface of the building blocks is coplanar with the printing surface of the jig, and the printing surface of the building blocks is in the printing range, so that the building blocks are matched with the types of the jig.
Step3: 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-by-two combination of building block printing surfaces to be printed, judging whether the types of the two building block printing surfaces are the same, judging whether the rectangles of the two building block printing surfaces are coplanar, and judging whether polygons corresponding to the two building block printing surfaces are contacted. The conditions for the contact of the two polygons are: there is a set of edges that are collinear and overlap by a distance greater than a certain threshold. When comparing the spatial relationship of two objects in a computer, the error range must be set first, and the value of the error depends on the calculation requirement of the computer. The threshold of the present invention is, for example, 0.01 music score unit, one music score unit=0.4 mm. In some cases, the threshold may be modified for ease of calculation. For example, the two building block printing surfaces are printing surfaces F1 and F2, and if there is one side of one polygon corresponding to the printing surface F1 and one side of one polygon corresponding to the printing surface F2, the two sides are parallel and overlap, the two building block printing surfaces are considered to be in contact. If the two building block printing surfaces are the same type, coplanar and in contact, the two building block printing surfaces belong to the same printing group. Obviously, this relationship has transmissibility, if the building block printing surface F1 and the building block printing surface F2 belong to the same printing group, and the building block printing surface F2 and the building block printing surface F3 belong to the same printing group, then F1 and F3 belong to the same printing group. This relationship and its transmissibility can be used to build a graph data structure in which each node represents a building block print surface and each edge represents a building block print surface at both ends of the edge in the same print set. After the graph data structure is established, all connected components in the graph represent the divided print groups.
Illustratively, the bricks in the model may be grouped according to the needs of the model designer and the relative positions between the groups represented by way of a scene graph (SCENE GRAPH). The scene graph is in essence a rooted tree (Rooted Tree). To compute the spatial transformation matrix for any group, the transformation matrix on the path from the root node of the scene graph to the group need only be sequentially multiplied.
Step4: 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 all building block printing surfaces in the printing groups.
The data of building blocks guarantees that the building block printing surfaces in the same printing group can be printed by using the same jig. The connection point of the building block printing surface refers to all connection points of the building blocks corresponding to the building block printing surface. All connection points in a printing group refer to connection points of all building block printing surfaces in the printing group. The sum of the rectangular areas of one printing group refers to the sum of the rectangular areas of all building block printing surfaces in the printing group. At this step, one fixture instance is created for all fixture types at initialization. The jig instance is an object-oriented programming (OOP) based expression representing an instantiation object of a FixtureInstance class in a computer program. And then forming all the printing groups into a queue according to the sequence of the sum of the rectangular areas from large to small, wherein the head area of the queue is the largest. For each printing group G1 from beginning to 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 example T1 of the jig type K1, for each connection point C4 of the jig example T1, for connection points C3 and C4, generating four matrices according to the transformation matrix generation method described in step S120, for each matrix P of the four matrices, if the matrix P is used to transform the printing group to a corresponding position, the following four conditions are all satisfied:
the printing group G1 is provided with a building block printing surface F4, the building blocks corresponding to the building block printing surface F4 are provided with a connecting point C5, and the connecting point C6 is arranged in the jig example T1 and is connected with the connecting point C6.
The building blocks corresponding to the printing surface of each building block in the printing group G1 are not collided with each building block in the printing typesetting corresponding to the jig example T1 and the jig example T1.
Each building block printing surface in the printing group G1 is coplanar with the jig printing surface of the jig example T1.
The print surface of each building block in the print group G1 is within the range of the jig print surface of the jig example T1.
Then it is considered that the jig instance T1 can place the print group G1 in a matrix P. And finding out the optimal placement mode from the placement modes of all the printing groups G1 on the jig example T1, placing the printing groups G1 into the printing typesetting of the jig example T1, skipping over other jig examples of the jig type K1, and searching the printing typesetting for the next printing group in the queue. The optimal placement mode should enable the printing group G1 and the printing surface origin of the jig example T1 to be closest to each other in the transverse direction of the printing surface of the jig example T1, or not be the only closest to each other in the transverse direction of the printing surface of the jig example T1 and closest to each other in the longitudinal direction of the printing surface of the jig example T1. The building block printing surface is in the printing range of the jig printing surface, which means that after the rectangle of the building block printing surface is projected to the plane of the jig printing surface, the rectangle of the building block printing surface becomes a subset of the rectangle of the jig printing surface. If all the four conditions are not all satisfied for the two-by-two combinations of all the connection points of the print group G1 and all the connection points of all the instances of the jig type K1, then the jig instance T1 is considered to be unable to place the print group G1 and a new jig instance T2 is generated for the jig type K1. If the jig example T2 can place the print group G1, the print group G1 is added to the jig example T2 by using an optimal placement method, so as to form a new print typesetting. If the jig example T2 cannot place the printing group G1, splitting the printing group G1 into a plurality of printing groups only comprising single building block printing surfaces, and adding the plurality of split printing groups into the queue tail. Step S140 is performed until all print groups in the queue are joined to a certain print composition.
In a specific embodiment, step4 comprises the steps of:
step 41, forming a print queue from large to small according to the sum of the print areas of the print groups.
Step 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placement condition of the printing group exists, if so, proceeding to step 43, and if not, proceeding to step 44. The placing conditions are as follows: all building blocks in the printing group are not beyond the range of the printing surface of the jig; all the building blocks in the printing group do not collide with the existing building blocks in the jig example; all building blocks in the printing group and the jig belong to the same whole. When judging whether all the building blocks in a certain printing group and the jig belong to the same whole, carrying out pairwise comparison on connection points between the two building blocks or between the jig and the building blocks, and judging that the two building blocks or the building blocks and the jig have connection relations if the two connection points are parallel, the distance of the straight line where the two connection points are located is smaller than a threshold value and the two connection points have mutually meshed parts. In the present invention, the connection point is actually a line segment. Under the condition that the two line segments are parallel, whether the straight line distance between the two line segments is smaller than a threshold value or not is actually judged. If the value is smaller than the threshold value, the two line segments are collinear. In addition, a condition is required: in the case where the two line segments are collinear, the overlap of the line segments should exceed some variable threshold. The variable threshold may vary from one instance to another, and typically we use a threshold of-1 Legae unit.
Step 43, the print set is put into the corresponding jig example, and step 47 is entered.
Step 44, adding a new jig example for the jig, and judging whether the jig example meets the placement condition, if yes, proceeding to step 45, and if not, proceeding to step 46.
Step 45, the print module is put into the fixture example, and step 47 is entered.
Step 46, splitting the printing group into a plurality of printing groups only comprising single building block printing surfaces, adding the printing groups into the printing queue to be placed again, and returning to step 41.
Step 47, if the unset print job is zero, go to step 48, otherwise return to step 42.
Step 48, record the number of jig examples of the jigs and the printing groups already placed on the jigs. According to the embodiment, the jig type corresponding to each building block printing surface is calculated according to the inputted building block model by using the pre-marked building block data, printing groups are divided according to the coplanarity and the contact relation of the building block printing surfaces, and the problems of collision, disconnection, jig space waste and the like which possibly occur in the majority are generated by typesetting of the jig, so that the quality and the efficiency of printing building block mapping are improved, and the beneficial effects are generated on the production of the building block model.
The building block map is a layer of pigment covered on the surface of the building block. In the present application, a building block map is understood as 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 a function of:
φ(p)=(u,v)
S(u,v)=C
Wherein p E V, (u, V) E [0,1] 2,C∈[0,1]3 are the vertex of the building block model, (uv) coordinates of the mapping space, and coordinates of the color space, respectively. Phi is called uv mapping function, S represents the sampling method of the picture.
Fig. 3 is a block diagram of an automatic typesetting device for printing building blocks. The device is used for executing the automatic typesetting method for printing the building blocks provided by any embodiment. The device comprises a geometric calculation module, a printing grouping module, a jig matching module and an automatic typesetting module.
The geometric calculation module is used for obtaining geometric data of the building blocks and the jig. The module uses the position, the main direction, the auxiliary direction, the length and the connection point type of the connection points of the building blocks to judge whether the building blocks are connected or not, and uses the convex geometry to judge whether the building blocks collide with each other or not.
The jig matching module is used for determining a jig corresponding to each building block printing surface. The module exhausts the arrangement between the building blocks and a certain jig, and judges whether the printing surface of the building blocks can be printed by using the jig.
The printing group dividing module is used for dividing all building block printing surfaces into at least one printing group. The module exhausts the combination of the building block printing surfaces, determines the coplanarity and contact relation of the combination of the building block printing surfaces, establishes a graph data structure by using the relation, and divides the printing groups by using the communication components of the graph data structure.
The automatic typesetting module is used for dividing all the printing groups into at least one jig typesetting. The module uses a greedy strategy based on the size of the print surface area to divide the print composition into one or more jig instances in sequence to form a print composition.
The invention also provides a storage medium which stores one or more programs for implementing the automatic typesetting method for building block printing. The method comprises the following steps: determining a printing jig corresponding to each building block printing surface according to the spatial relationship of the building blocks; dividing all building block printing surfaces into a plurality of printing groups according to the coplanarity and contact relation of the building block printing surfaces; and dividing all the printing groups into a plurality of printing jig typesets by using a greedy strategy according to the sequence of the printing areas of the printing groups from large to small. The storage medium containing the computer executable instructions provided by the invention is 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 building block printing of the present invention, the apparatus comprising a processor 31, an output device 32 and an input device 33 and a memory 34. The number of processors 31 in the device may be one or more, one processor 31 being taken as an example in fig. 3; the processor 31, memory 34, input means 33 and output means 32 in the device may be connected by a bus or other means, in fig. 4 by way of example.
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 building block printing in the embodiment of the present invention. The processor 31 executes various functional applications of the apparatus and data processing by running software programs, instructions and modules stored in the memory 34, i.e., implements the automatic typesetting method for building block printing described above.
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, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, 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, memory 34 may further include memory located remotely from processor 31, which may be connected to the device via 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 means 33 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings of the device/terminal/server and function control. The output device 32 may include a display device such as a display screen.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art 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 (RandomAccessMemory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the automatic typesetting device for building block printing, each included unit and module are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be realized; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (7)

1. An automatic typesetting method for building block printing is characterized by comprising the following steps:
step 1: obtaining geometric data of building blocks and jigs according to the input building block model;
step 2: according to the spatial relationship of the building blocks, determining a jig corresponding to each building block printing surface, wherein the building block printing surface is a region to be printed on the surface of the building block;
Step 3: dividing all building block printing surfaces into at least one printing group according to the coplanarity relation of the building block printing surfaces;
Step 4: 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 all building block printing surfaces in the printing groups,
In step2, the arrangement mode of the building blocks on any jig is exhausted, and if at least one arrangement mode meets the following conditions, the corresponding building block printing surface is considered to be printed 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 the threshold value;
The printing surface of the building blocks is in the printing range of the corresponding jig;
The building blocks and the jig do not collide,
The jig printing surface describes the maximum printing range of the printer on the jig,
The step 4 comprises the following steps:
Step 41, forming a printing queue from large to small according to the sum of printing areas of the printing groups;
step 42, sequentially trying to place the printing group on any jig, judging whether a jig meeting the placement condition of the printing group exists, if so, entering step 43, and if not, entering step 44;
Step 43, putting the printing group into a corresponding jig example, and entering step 47;
Step 44, adding a new jig example for the jig, judging whether the jig example meets the placement 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, splitting the printing group into a plurality of printing groups only comprising single building block printing surfaces, adding the printing groups into a printing queue to be placed again, and returning to step 41;
Step 47, if the unset print group is zero, go to step 48, otherwise return to step 42;
step 48, record the number of jig examples of the jigs and the print packs already placed on the jigs, and in step 42, the placement conditions are:
all building blocks in the printing group are not beyond the range of the printing surface of the jig;
All the building blocks in the printing group do not collide with the existing building blocks in the jig example;
All building blocks in the printing group and the jig belong to the same whole.
2. The automatic typesetting method for building block printing according to claim 1, wherein in step 3, all building block printing surfaces are judged in pairs, and if two building block printing surfaces are parallel, the normal distance is smaller than the threshold value, and polygons corresponding to the building block printing surfaces are contacted, the two building block printing surfaces are considered to need to be printed in a coplanar manner, and the two building block printing surfaces are divided into the same printing group.
3. The automatic typesetting method for printing of building blocks according to claim 1, wherein when judging whether all building blocks in a certain printing group belong to the same whole with the jig, the two building blocks or the connecting points between the jig and the building blocks are compared pairwise, if the two connecting points are parallel, the distance of the straight line where the two connecting points are located is smaller than a threshold value, and the two connecting points have mutually meshed parts, the two building blocks or the building blocks and the jig are judged to have a connection relation.
4. The automatic typesetting method for building block printing according to claim 1, wherein in step 42, if the printing group has a plurality of placement modes satisfying the placement conditions in the jig, a placement mode with the smallest reference point of the horizontal coordinate distance from the printing surface of the jig is selected, and if there are a plurality of placement modes with the smallest reference point, a placement mode with the smallest reference point of the vertical coordinate distance from the printing surface of the jig is selected.
5. An automatic typesetting apparatus according to the automatic typesetting method of building block printing of claim 1, characterized in that the apparatus comprises:
the geometric calculation module is used for obtaining geometric data of the building blocks and the jig;
the jig matching module is used for determining a jig corresponding to each building block printing surface;
The printing group dividing module is used for dividing all 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.
6. A storage medium storing one or more programs for implementing the automatic typesetting method of building block printing according to claim 1.
7. A system comprising at least one processor and a memory for storing one or more programs that when executed by the processor implement the automatic typesetting method of building block printing of 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 CN114896812A (en) 2022-08-12
CN114896812B true 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)

Families Citing this family (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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2524031C (en) * 2003-05-20 2015-07-07 Interlego Ag Method and system for manipulating a digital representation of a three-dimensional object
RU2007101498A (en) * 2004-06-17 2008-07-27 Лего А/С (Dk) AUTOMATIC GENERATION OF INSTRUCTIONS FOR BUILDING MODELS FROM STANDARD BLOCKS
CN109408001B (en) * 2018-08-22 2021-10-22 先临三维科技股份有限公司 Multi-model 3D printing method, device, 3D printing device and storage medium
CN110489794B (en) * 2019-07-15 2022-08-05 武汉大学 Construction method of happy and tall building block plane drawing facing simple strokes
CN110992472A (en) * 2019-12-06 2020-04-10 广东邦宝益智玩具股份有限公司 Building block 3D model intelligent building system construction method
CN113742808B (en) * 2021-09-08 2024-03-26 深圳千帜科技有限公司 Method for designing spliced building block model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN114896812A (en) 2022-08-12

Similar Documents

Publication Publication Date Title
Liu et al. Autoshape: Real-time shape-aware monocular 3d object detection
Vahedi et al. Caging polygons with two and three fingers
CN115222806B (en) Polygon processing method, device, equipment and computer readable storage medium
CN114896812B (en) Automatic typesetting method, equipment, storage medium and system for building block printing
US11908084B2 (en) Method for generating high-quality real-time isosurface mesh
Nagy Cellular topology and topological coordinate systems on the hexagonal and on the triangular grids
CN113628343B (en) Three-dimensional grid combination processing method and device and storage medium
US11157795B2 (en) Graph partitioning and placement for multi-chip neurosynaptic networks
CN111880571A (en) Rigid formation switching method and device for unmanned aerial vehicle
CN116402979A (en) Three-dimensional die surface piece lightweight processing method and device and electronic equipment
US20240403530A1 (en) Automatically determining a skeleton line and airbridges of coplanar waveguide
CN106600691B (en) Fusion correction method and system of multi-channel two-dimensional video images in three-dimensional geographic space
CN115891175A (en) Model cutting and merging method, device, 3D printer and readable storage medium
CN111488648B (en) Automatic drawing method, system, equipment and storage medium for ship structure diagram
CN114969893A (en) Ceiling keel design method based on internal and external corner identification and storage medium
Chandru et al. NC-algorithms for minimum link path and related problems
CN110689594A (en) A method and apparatus for determining discrete lines of a triangular grid
CN115049028B (en) Construction area partitioning method, system, terminal and medium based on unsupervised learning
CN114529706B (en) Method, device, equipment and medium for splitting target object in three-dimensional model
CN116681864A (en) Space grid generation method, device, equipment and medium
US20210125385A1 (en) Triangle element division method, modeling apparatus, computer readable medium storing program, and data defining two-dimensional planar figure
CN114255171B (en) Method and device for calculating similar legend conversion relation
Bianco et al. Sensor placement optimization in buildings
CN112487554A (en) Novel method, system and computer equipment for end cut definition based on model
CN116699946A (en) Mask data processing method and device

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