<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Software and Algorithmic Support for representation of CAD models in 2D von Neumann neighborhood</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yaroslav Sokolovskyy</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksiy Sinkevych</string-name>
          <email>oleksiy1694@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ukrainian National Forestry University</institution>
          ,
          <addr-line>Gen. Chuprynky Str., 103, Lviv, 79057</addr-line>
          ,
          <country country="UA">UKRAINE</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>1</fpage>
      <lpage>3</lpage>
      <abstract>
        <p>In this paper we consider the system of initial theoretical positions, which are the basis for research on the search for variants of cellular automata in the study of thermo-mechanical processes in 3D objects of SolidWorks. These studies are carried out by representing 3D objects in the 2D von Neumann collations of the 1st order.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>The cellular automata is a discrete model, which is
described by a set of a number of cells that forms a periodic
lattice. This lattice allows you to determine the state of each of
its cells at a specific time, and allows you to determine the state
of its neighboring cells, the distance to which does not exceed
the permissible limits.</p>
      <p>Currently, cellular automata are often used in problems of
modeling hydro and gas dynamic, evolutionary, behavioral, or
different vibrational probabilistic processes, which in turn
caused the comparative ease of implementation, which in turn
gives better prospects for their future use.</p>
      <p>The main direction of the research of cellular automata is
the algorithmic solving of individual problems, which in one
way or another use a two-dimensional coordinate system.</p>
      <p>The result of this work will be the development of the
concept of the use of cellular automata for the study of
threedimensional objects, as well as the creation of appropriate
software, which will allow the use of this concept in
conducting various types of experiments.</p>
    </sec>
    <sec id="sec-2">
      <title>II. FORMULATION OF THE PROBLEM</title>
      <p>
        At the beginning of this work, we have a 3D model of
fixedsized piles of stakes that were assembled in the SolidWorks
environment. This assembly of 3D model was created by using
the developed and described in previous papers Software. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ],
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
      </p>
      <p>This 3D model has the following initial parameters:
• Height, length and width of the stack;
• Number of lumber in the stack;
• The distance between lumber;
• Wood species;
• Dimensions of the pallet and gaskets;
• Temperature values (not necessarily the same);
• Moisture values (not necessarily the same).</p>
      <p>In addition to the initial parameters of the loaded 3D model,
it is necessary to specify the size of the drying space, which is
filled with air mass. These sizes can be specified through the
volume or through the values of its height, length and width. It
is also necessary to indicate the initial temperature and
humidity of the drying space. You also need to specify a
mathematical model that will allow you to change these values
when changing time.</p>
      <p>In carrying out this work is necessary to solve a number of
problems, including:
• Calculate and determine the number of 3D cubes of the
same size that can be diving through the model under
investigation using the developed application software and the
SolidWorks API;
• Convert each 3D cube to 2D neighborhood von Neumann
1st order and establish certain relationships between the faces
of these 3D cubes using the above-mentioned dividing
process;
• Visually present the established interconnections between
the facets in the form of a corresponding scheme;
• Develop a set of rules that could use cellular automata to
change the numerical values of temperature and humidity on
the edges of developed 3D cubes;
• To develop classes with which we can implement the
proposed layout of lumber of fixed size;
• It is necessary to develop a sequence diagram that will
better understand the essence of the developed system classes.</p>
      <p>Execution of all the above-mentioned tasks will allow all
users to obtain the tools by which it will be possible to use the
theory of cellular automata in determining the thermal and
mechanical processes in the developed integrated CAD.</p>
    </sec>
    <sec id="sec-3">
      <title>IІI. DISTRIBUTION OF THE</title>
      <p>RESEARCHED OBJECT</p>
      <p>The primary objective of this work is the allocation of a
fixed size timber on 3D cubes, which then will be used for
distribution in 2D neighborhood von Neumann.</p>
      <p>For the distribution of lumber, it is necessary to take into
account a number of rules, among which:
• It is necessary to divide the stack on a certain number of
lumber, which will be divided into 3D cubes of the same size.
• The number of 3D cubes is limited and is determined by the
cutoff density that is given in advance.
• The cut density should be sufficiently small to ensure that
there are enough 3D cubes in the depth of the lumber.</p>
      <p>In order to comply with the above rules it was decided to cut
the lumber according to the scheme of uniform section with
identical parts.</p>
      <p>The selected lumber has the following dimensions: height
and width of 100 mm, and length 1 m.</p>
      <p>Further, according to the developed software application,
the form of which is shown in Figure 1, the calculation of the
number and size of 3D cubes was performed. Consequently,
with such dimensions of the lumber can be built 3D cubes,
which can have 15 different sizes of external facet. If we take
the largest dimension of the facet, which is 100 mm, then we
will have only 10 cubes, which of course is not enough.</p>
      <p>When selecting the size of facet at 0.25 mm, we get 640
million 3D cubes, the calculation of which, even on powerful
computers take long. That is why it was decided to select 3D
cubes, the outer edges of which have a size of 20 mm. With
such dimensions of external facet, the total number of 3D
cubes will be 1250 pieces.</p>
      <p>After calculation of the required 3D cubes were made the
timber section of a given size. This process is fully automated.
This automation was achieved by using developed software
application that uses capabilities of the SolidWorks API.</p>
      <p>When we get 3D cubes, you need to assign them the value
of the initial parameters of the stack. Assuming that the
distance between the lumbers in the stack should be filled with
airspace. Next, we need to divide the initial parameters into
two categories, one of which will be assigned to the airspace,
and the other formed 3D cubes.</p>
      <p>The following parameters that will be assigned to 3D cubes
include:
• Height, length and width are given according to the size of
created 3D cubes, for example, 20 mm;
• Wood species;
• Initial temperature and humidity. If they are different, then
it is necessary to uniform distribution along the length of a
given timber.</p>
      <p>The rest of the initial parameters are transmitted to the
airspace surrounding the stack. Air space similarly will be
presented as an array of 3D cubes of the same size. This
representation will allow us to calculate a mathematical model
that serves to change the parameters of the drying agent in
space and time.</p>
      <p>IV. CONVERSION OF 3D CUBES AND INSTALL</p>
      <p>DEPENDENCIES BETWEEN ITS FACETS</p>
      <p>Consequently, when we having 3D cubes, it is necessary to
make their transformation in order to represent them in the
form of 2D squares. This step is very important and necessary,
because with this transformation we will be able to use cellular
automata</p>
      <p>In general, one 3D cube has six facet, the numbering of
which is shown in Figure 2.</p>
      <p>
        To represent cellular automata, we can use one of the two
most popular 2D nodes, namely 2D Moore's area and 2D Von
Neumann Fields. If we talk about the Moore countryside then
it represents a set of eight cells on a square parquet, having a
common vertex with this cell. In turn, the von Neumann
occipital represents a set of four cells on a square parquet,
having a common side with this cell. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
      </p>
      <p>It is clear that in order to accomplish this task, the 2D field
of von Neumann is best suited to the 1st order. According
numbering of 3D cube facet and 2D neighborhood von
Neumann in 1st order, we can get a graphical relationship facet
of 3D cubes, which are shown in Figure 3.</p>
      <p>In Figure 3, we can see how one 3D cube facet can affect to
another. Based on these relations was developed a general
scheme for the internal and external facet of the created 3D
cubes.</p>
      <p>Visual representation of the principle of the scheme
relationship between the external facets of 3D cubes, are
shown in Figure 4.</p>
      <p>
        The form of this schema is shown in Figure 5. The values of
X [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1-6</xref>
        ] are the own facet of the selected 3D cube, and the value
Y [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1-6</xref>
        ] is the facet of the outer 3D cube that is adjacent to the
selected one. Consequently, each facet of the selected 3D cube
can have a relation with only one facet of the outer 3D cube.
• The result of cellular automata can be mentioned desired
temperature or humidity, or the passage of a specified time
simulation.
      </p>
    </sec>
    <sec id="sec-4">
      <title>VI. DEVELOPMENT CLASS AND SEQUENCE DIAGRAM</title>
      <p>To solve this problem, it is necessary to develop several
basic classes. With these classes, you can implement a scheme
of interconnections between the faces of 3D cubes.</p>
      <p>The graphical relationship between the above-described
classes is shown in Figure 6.
V. DEVELOPING THE RULES OF CONDUCT BASED ON</p>
    </sec>
    <sec id="sec-5">
      <title>CELLULAR AUTOMATES</title>
      <p>
        Therefore, to accomplish the task by using cellular
automata, it is necessary to develop some rules of behavior that
should not violate the three basic components necessary for
using of cellular automata, namely:
• The parallelism by which cell renewal occurs
simultaneously and independently of one another;
• The locality in which the new cell value depends only on its
previous value and the values of its cells around;
• Homogeneity, in which the cells must always be changed
according to the same rules. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
      </p>
      <p>To construct own rules for changing the values of the
formed cells, we used: the relationship scheme, which is
shown in Figure 4, the software application, the form of which
is shown in Figure 1 and the three main components of the use
of cellular automata.</p>
      <p>In general, developed several rules, including:
• All 3D cubes must have faces of the same size, which in
future will be prevent the presence of 2D cells of different
sizes;
• All cells have their own initial values, which don`t
necessarily have the same numeric values (e.g. temperature or
humidity);
• The faces of one 3D cube can only affect those faces of their
own 3D cube, which are shown in Figure 3;
• Each facet of one 3D cube can directly affect only one facet
of another 3D cube;
• Each 3D cube of the air environment can affect other faces
of the same environment, or on the outer edges of those 3D
cubes of lumber that are in direct contact with this
environment;
• The value of the temperature and humidity of each face may
vary according to the laws of thermodynamics, energy
conservation laws, and the mathematical models developed
and indicated in advance;
The first class is called "Cube". This class contains
information for each of the six faces of one cube. This
information includes the numerical value of temperature,
humidity and the general condition of each face. By itself, the
state of the face allows us to know whether it is necessary to
change its numerical value in the next iteration. In general, we
can say that this class represents one of the smallest parts of
the object being studied.</p>
      <p>The second class is called "Level". This class is a
twodimensional array, which consists the elements of class
"Cube". In essence, this class is an array of 3D cubes of the
same level. If we recall the initial section of the object under
study then it turns out this class has a dimension of 5х50 equal
250 cubes.</p>
      <p>The third class is called "Lumber". This class is one solid
timber. It is clear that this class is a one-dimensional array,
which consists the elements of class "Level". Again, if we
recall the initial section of the investigated object, then this
class will have a dimension of 5, and this is 5 * 250, which is
equal to 1250 cubes.</p>
      <p>The next class is called "Stack". It is clear that this class is a
stack of lumber. This class is a two-dimensional array, which
consists the elements of class "Lumber".</p>
      <p>Class "3D_Model" serves to download the original 3D
model and its further use in the partition process.</p>
      <p>The "Find" class is needed to find the lumber in the
downloaded 3D model. This class gives us the ability to
identify all possible section variants of the 3D model.</p>
      <p>The next class is called "Cut" is required for the 3D model
partition according to a given schema by using SolidWorks
API. The last class "Calculation" serves for calculating
numerical values on the edges of created 3D cubes. Before
describing these classes, it was create the sequence diagram,
which is shown in Figure 7.</p>
      <p>The result of this work is the creation the new software,
which allows you to receive two-dimensional arrays of
information that are necessary for using cellular automata. In
addition, this software allows you to obtain arrays of
information from the downloaded 3D models that are
assembly in SolidWorks environment, by using early
development application software. All of these processes were
fully automated with the use of the SolidWorks Application
Program Interface.</p>
    </sec>
    <sec id="sec-6">
      <title>VIII. CONCLUSION</title>
      <p>As a result of this work, was developed a concept for using
the cellular automata for the study of three-dimensional
objects.</p>
      <p>In addition, was created a software with which you can
download a 3D model of lumber piles and instantly calculate
the number of possible variants of cutting each of the lumber
into 3D cubes of the same size. The cutting process itself takes
place using the SolidWorks API.</p>
      <p>The resulting 3D cubes were presented in the form of 2D
neighborhood of von Neumann 1st order. With this view, a
relationship scheme was created for the inner and outer sides
of the created 3D cubes. On the basis of established
relationships was created, a certain set of rules for changing
the numeric values that apply to the edges of 3D cubes.</p>
      <p>Another important task that was accomplished in this work
is the development of system classes, their further description,
and a description of their interactions. As a visual
representation of this was given a sequence diagram of the
developed classes. In general, in this work, we
examined the possibilities of using the theory of cellular
automata in studying models presented in a three-dimensional
coordinate system. To study this concept, by conducting
various types of experiments, was created an appropriate
software in environment Microsoft Visual Studio C#.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sokolovskyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Sinkevych</surname>
          </string-name>
          , “
          <article-title>Software for Automatic Calculation and Construction of Chamber Drying Wood and its Components”</article-title>
          ,
          <source>Materials of the XII International Conference MEMSTECH</source>
          <year>2016</year>
          ,
          <volume>20</volume>
          -
          <fpage>24</fpage>
          .
          <fpage>04</fpage>
          .
          <year>2016</year>
          , Lviv, Ukraine - Publisher
          <source>Lviv Polytechnic</source>
          ,
          <year>2016</year>
          . - pp.
          <fpage>209</fpage>
          -
          <lpage>213</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sokolovskyy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Sinkevych</surname>
          </string-name>
          , “
          <article-title>Calculation of the Drying Agent in Drying Chambers”</article-title>
          ,
          <source>Materials of the XIV International Conference CADSM-2017</source>
          ,
          <fpage>21</fpage>
          -
          <lpage>25</lpage>
          .
          <fpage>02</fpage>
          .
          <year>2017</year>
          , Polyana, Ukraine - Publisher
          <source>Lviv Polytechnic</source>
          ,
          <year>2017</year>
          . - pp.
          <fpage>27</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Toffoli</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Margolus</surname>
            <given-names>N. A Cellular</given-names>
          </string-name>
          <string-name>
            <surname>Automata Machine</surname>
          </string-name>
          . - M.: WORLD,
          <year>1991</year>
          . - 280 p.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Wolfram</surname>
            <given-names>S.</given-names>
          </string-name>
          <article-title>A new kind of science</article-title>
          . - Wolfram Media Inc., Champaign, Ill., USA.
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>