RegularHex Pack, again

Bug #550912 reported by moradi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Invalid
Undecided
Unassigned

Bug Description

Hi Vaclav,
in file pack.py for RegularHex pack in bzr2112
I think y+= hy/2 must be y+= hy/3
 also,when run it there is an error:

File "/home/moradi/YADE-trunk/YADE/lib/yade-bzr2112/py/yade/pack.py", line 206
     <<<<<<< TREE
      ^
 SyntaxError: invalid syntax

in file there are these lines:
<<<<<<< TREE
  if k%2!=0: x+=a/2.; y+=h/3.
=======
  if k%2!=0: x+=a/2.; y+=hy/2.
>>>>>>> MERGE-SOURCE

thank you
Nasibeh Moradi

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

Hi, this is not problem in code itself but on your machine. This <<<<<< TREE etc was inserted by bzr whe you were updating your local branch as there was conflict between your local change and upstream change. See "bzr help conflicts". To simply forget your local changes, do "bzr revert py/pack/pack.py".

Changed in yade:
status: New → Invalid
Revision history for this message
moradi (nmoradi1984) wrote :

hi,
I think y+= hy/2 must be y+= hy/3
it isn't correct? but I check it with SolidWorks software

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

1. Please close the bug and repone new one if it is a different problem.

2. Why you think it should be hy/3? I don't know what is Solidworks; you should give some better reason.

Revision history for this message
moradi (nmoradi1984) wrote :

1- this is not a new problem, I said it in mail-list and the first of this bug.

2-SolidWorks is a 3D CAD software, I draw the sphere and assemble in HCP pack and measure the distances.
also I run the pack with gap=0 and I saw that there is space between some spheres!

Revision history for this message
moradi (nmoradi1984) wrote :

Let's consider 3 spheres in plane xy and 1 sphere above them, the fourth sphere have equal distance from 3 spheres, if we project these distances on plane xy, these projected lines have still equal size, so, the fourth sphere is above of center of triangle. The center of triangle is also in h/3 of edge.

Revision history for this message
Václav Šmilauer (eudoxos) wrote :

(The first report was about syntax error in source, so this is really a different issue. Anyway)

a is side of the equilateral triangle. In the xy plane, spheres are laid in rows parallel with x. Distance of these rows is hy=a*sqrt(3)/2. In the z direction, the planes need to assume distance equal to height of equilateral terahedron with side a. This height is hz=a*sqrt(6)/3. This is also what is in the code. Did I overlook something?

Revision history for this message
moradi (nmoradi1984) wrote :

you are right,
also, the layer parallel xy plane is shifted in y direction equal hy/3 (only for the layers with k%2!=0).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.