Bonjour Karine,
Pour le premier problème il y a avait un
lineStyle au lieu de
linestyle.
Pour le second problème on peut faire dessiner les arêtes des cubes dans la scène 3D avec l'option
hidden:=1.
J'ai diminué un peu le nombre de facettes des sphères pour que ce soit moins lourd.
Voici une proposition :

- X_cristallo_CFC_SiteT.png (55.67 Kio) Consulté 8660 fois
Code de l'élément graphique :
- Code: Tout sélectionner
[
LabelSize:=large,
//Définition des sommets
Ax1:=M(2,0,0), Ay1:=M(0,2,0), Axy1:=M(2,2,0),
Az1:=M(0,0,2), Ax2:=M(2,0,2), Ay2:=M(0,2,2), Axy2:=M(2,2,2),
// Définition des milieux des faces
Mdevant:=M(2,1,1), Mderriere:=M(0,1,1),
Mg:=M(1,0,1), Md:=M(1,2,1),
Mdessous:=M(1,1,0), Mdessus:=M(1,1,2),Arrows:=0,
Color:=gray,Width:=12,
Gcub := Edges(Parallelep(Origin,2*vecI,2*vecJ,2*vecK)),
cub := Edges(Parallelep(Ax1,vecJ,-vecI,vecK)),
/// Définition du tétraédre
SiteT:=Tetra(Ax1,vecJ -vecI,-vecI+vecK,vecJ+vecK),
Label(-1.2+0.5*i,"$a$",-0.22-0.75*i,"$a$",-0.57+1.83*i,"$a$"),
Build3D(
//Site tetra :
bdFacet(SiteT,[color:=powderblue,backculling:=1,smooth:=0,contrast:=0.5,opacity:=1,twoside:=1,border:=1,hidden:=1]),
bdLine([Mdevant,Mderriere,jump,Mg,Md,jump,Mdessous,Mdessus],[color:=magenta,linestyle:=dotted,]),
bdLine([Gcub,cub],[color:=gray,width:=12,hidden:=1]),
///Sphères sur le milieux des faces
bdFacet(Sphere(Md,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
bdFacet(Sphere(Mderriere,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
bdFacet(Sphere(Mg,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
bdFacet(Sphere(Mdessus,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
bdFacet(Sphere(Mdessous,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
bdFacet(Sphere(Mdevant,0.2,25,12),[color:=magenta,backculling:=1,smooth:=0]),
///Sphères aux sommets
bdFacet(Sphere(Origin,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Ax1,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Ay1,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Ay2,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Axy1,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Axy2,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Az1,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
bdFacet(Sphere(Ax2,0.2,25,12),[color:=orange,backculling:=1,smooth:=0]),
//Contour de la maille
//bdLine(),
//Site octa : au centre de la maille
//bdPyramid([Mg,Mdevant,Md,Mderriere],Mdessus,[color:=powderblue,backculling:=1,smooth:=1,contrast:=0.5,opacity:=0.8,twoside:=1,border:=1,hidden:=1]),
//bdPyramid([Mg,Mderriere,Md,Mdevant],Mdessous,[color:=powderblue,backculling:=1,smooth:=1,contrast:=0.5,opacity:=0.8,twoside:=1,border:=1,hidden:=1]),
),
Display3D(),
]
J'espère que cela correspond à ce que tu voulais.