Home > Net >  For c # rectangular layout blanking algorithm instance
For c # rectangular layout blanking algorithm instance

Time:09-24

In c # to develop a sample, the size of a specified rectangular, within the scope of the rectangle will provide other different sizes of rectangular layout, generate layout diagram, between rectangular and margins, respectively, can be set spacing, layout optimization for this feature

CodePudding user response:

This still be bought directly, the algorithm is too complex, estimates that no one will be free to share

CodePudding user response:

Set margins for rectangular can count rectangular padding as rectangular way to simplify its parameter,

Many such programs, such as in a DIV inside automatic discharge hundreds of photos, is this kind of algorithm, is simply the partition of free space at any time dynamically generate a rectangle (free rectangular), and for each need into a rectangle, traverse to find the closest to a width, or height closest to spare the rectangle embedded in it,

CodePudding user response:

Free rectangular can have repeat intersecting part, no matter, when put away any a destination rectangle, delete from the list of free rectangular all fellowship with the free rectangular, from free rectangular (remove occupied the top left corner) 2 new free rectangular back into the free rectangular list, draw yourself to explain this rule is understood,

CodePudding user response:

Margin between just increase the size of the destination rectangle, does not affect the layout, don't need to consider
Typesetting should try to avoid the occurrence of broken line (late is bad for cutting)
Left upper corner of the destination rectangle to gather once (rotating), minimize the control of the rectangular area or equal material while
With binary tree save the result

CodePudding user response:

Thank you, my layout requirements is not high, they can optimize slightly discharged, are paid, have the experience you can contact me

CodePudding user response:

Is that you go to pig eight quit to send out, why hopeless wait here

CodePudding user response:

Thank you, just want to people here, more to see if there is a great god see

CodePudding user response:

Inside the small rectangular long, wide on a structure of l, w, suppose there are n a small rectangle, then there is n l and n w, then to all combinations of these l and w, and each of the portfolio and, and on these and sorting, and the most close to the outside big rectangular long, wide is the optimal solution you want
Need to control a small rectangular their long and wide can not participate in combination algorithm

Small size, can achieve almost

CodePudding user response:

This is a 2 d packing problem, the use of skyline method + effect drawing group of genetic algorithm, if there is need to private chat and 30 under rectangular soon, all the 197 operator can row to more than 97%,

CodePudding user response:

Two-dimensional problem of permutation and combination, can only be compared with the exhaustive method, consider how much raw material, semi-finished products best combination, such as five raw materials, three kinds of semi-finished products, not every raw material arrangement on all three kinds of semi-finished products best, first a mathematical model, to find the best algorithm

CodePudding user response:

General case is impossible to enumerate, the field examples given for 25-197 different size of the rectangle, the enumeration has failed,

CodePudding user response:

No money, what do you want to algorithm? Understand, also want to spend time,

CodePudding user response:

With a certain algorithm can achieve fairly good effect,

25 different rectangular full line of effect, for example,


97 different cover more than 97% occupancy rate in rectangular arrangement takes about 2 minutes, the effect of

CodePudding user response:

reference qq_30270773 reply: 3/f
with certain algorithm can achieve fairly good effect,

25 different rectangular full line of effect, for example,


97 different cover more than 97% occupancy rate in rectangular arrangement takes about 2 minutes, the effect of

Upstairs can share the related algorithms and software?

CodePudding user response:

The two-dimensional packing and greed

CodePudding user response:

The simplest way is binary, put the pyramids

CodePudding user response:

Stack stack
Stack stack
Stack stack

CodePudding user response:

Can share the source code?
  •  Tags:  
  • C #
  • Related