← Back to team overview

yade-users team mailing list archive

Re: Some issues with Facet objects (python newbie inside)

 

If you want to create plane with
utils.facetBox you have to change wallMask:

-x (1), +x (2), -y (4), +y (8), -z (16), +z (32)

So, if you need only the bottom of the cube, you should use wallMask=1, or
wallMask=2 etc.
______________________________


Anton Gladkyy


2009/12/9 Sergei D. <dorofeenko@xxxxxxxxx>

>
> > Second, I generated a simple example in order to be familiar with the
> > "python way" of scripting (testGravity_Box.py  and testGravity_Facet.py
> > attached). Even if I am still confused with the different attributes to
> > define in the dispatchers, simulations run, but, I get an error when I
> use
> > Facet instead of Box which says:
> >
> > FATAL yade.InteractingFacet
> >
> /home/sch50p/yade/pkg/common/DataClass/InteractingGeometry/InteractingFacet.cpp:32
> > postProcessAttributes: InteractingFacet has coincident vertices 2 (0 0 0)
> > and 0 (0 0 0)!
> >
>
> It is because you have box with zero height, i.e. plane. Just try:
>
>
> O.bodies.append(utils.facetBox((0,0,0),10,10,10),wallMask=63,color=1,1,1),wire=True))
>
> In order to create a alone facet, use utils.facet.
> In order to create a plane you can use gts:
>
> import gts
>
> plane=pack.sweptPolylines2gtsSurface([[Vector3(x0,y0,z0),Vector3(x1,y1,z1),Vector3(x2,y2,z2),Vector3(x3,y3,z3)]],capStart=True,capEnd=True)
>
> plnIds=O.bodies.append(pack.gtsSurface2Facets(plane.faces(),material=...,color=...))
>
>
>
>
> --
> Best regards,
>
> Sergei Dorofeenko,
> Cand. Phys.-Mat. Sci.
>
> Institute of Problems of Chemical Physics,
> Chernogolovka, Moscow region, Russia.
>
> e-mail: dorofeenko@xxxxxxxxx
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help   : https://help.launchpad.net/ListHelp
>

References