Changeset 2241 for trunk/GSASIIplot.py


Ignore:
Timestamp:
May 6, 2016 9:23:26 AM (7 years ago)
Author:
vondreele
Message:

draw unit cell box for stacking fault drawings & change atom/bond diameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2239 r2241  
    60346034    Gr = np.array([0,255,0])
    60356035    Bl = np.array([0,0,255])
    6036     uBox = np.array([[0,0,0],[1,0,0],[0,1,0],[0,0,1]])
    6037     uEdges = np.array([[uBox[0],uBox[1]],[uBox[0],uBox[2]],[uBox[0],uBox[3]]])
    6038     uColors = [Rd,Gr,Bl]
     6036    Bc = np.array([0,0,0])
     6037    uBox = np.array([[0,0,0],[1,0,0],[1,1,0],[0,1,0],[0,0,1],[1,0,1],[1,1,1],[0,1,1]])
     6038    uEdges = np.array([
     6039        [uBox[0],uBox[1]],[uBox[0],uBox[3]],[uBox[0],uBox[4]],[uBox[1],uBox[2]],
     6040        [uBox[2],uBox[3]],[uBox[1],uBox[5]],[uBox[2],uBox[6]],[uBox[3],uBox[7]],
     6041        [uBox[4],uBox[5]],[uBox[5],uBox[6]],[uBox[6],uBox[7]],[uBox[7],uBox[4]]])
     6042    uColors = [Rd,Gr,Bl,Wt-Bc, Wt-Bc,Wt-Bc,Wt-Bc,Wt-Bc, Wt-Bc,Wt-Bc,Wt-Bc,Wt-Bc]
    60396043    AtInfo = Layers['AtInfo']
    60406044    Names = [layer['Name'] for layer in Layers['Layers']]
     
    62236227        for line,color in zip(uEdges,uColors):
    62246228            glColor3ubv(color)
    6225             glVertex3fv([0,0,0])
    6226 #            glVertex3fv(-line[1])
     6229            glVertex3fv(line[0])
    62276230            glVertex3fv(line[1])
    62286231        glEnd()
     
    63026305        glTranslate(-Tx,-Ty,-Tz)
    63036306        RenderUnitVectors(0.,0.,0.)
    6304         radius = 0.2
     6307        radius = 0.5
     6308        glShadeModel(GL_SMOOTH)
    63056309        for iat,atom in enumerate(XYZ):
    63066310            x,y,z = atom
     
    63086312            color = np.array(CL)/255.
    63096313            RenderSphere(x,y,z,radius,color)
    6310             RenderBonds(x,y,z,Bonds[iat],0.05,color)
     6314            RenderBonds(x,y,z,Bonds[iat],0.10,color)
    63116315            if Page.labels:
    63126316                RenderLabel(x,y,z,'  '+AtNames[iat],matRot)
Note: See TracChangeset for help on using the changeset viewer.