← Back to team overview

yade-dev team mailing list archive

Re: [yade dev] body state from STL import

 

Hi, Luc,

It seems, it is a bug. Could you not report it on bugtracker and attach
there the problem script with stl-file.

Thank you.

Anton


2010/6/9 luc scholtes <lscholtes63@xxxxxxxxx>

> Hi guys,
>
> Maybe I should have opened a bug for that, but it seems that STL import
> does not handle the case where body state is customized. For instance, with
> CohesiveFrictionalPM, where body state is customized to body CFpmState
> (inheritance from body state BTW), when I launch a python script which
> contains those lines:
>
> facetMat =
> O.materials.append(CFpmMat(type=0,young=1e9,frictionAngle=radians(30),poisson=0.4,density=2600))
>
> O.bodies.append(ymport.stl('Yplane.stl',wire=False,color=(1,0.99,0.99),material=facetMat))
>
> I get this error message:
>
> O.step();
> RuntimeError: Body #0: Body::material type CFpmMat doesn't correspond to
> Body::state type State (should be CFpmState instead)
>
> Looking into the corresponding xml shows that, indeed, body state is not
> defined as body CFpmState, which produces the error. I have checked that the
> error does not come from CFpm itself by launching the same script with the
> same facet plane created from utils.facet:
>
> facetMat =
> O.materials.append(CFpmMat(type=0,young=1e9,frictionAngle=radians(30),poisson=0.4,density=2600))
>
> O.bodies.append(utils.facet([[-1.,0.,0.5],[1.,0.,-1.],[1.,0.,1.]],wire=False,color=(1,0.99,0.99),material=facetMat))
>
> and it works (body state is defined as the customized one in the xml).
>
> Thanks for helping
>
>   Luc
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References