← Back to team overview

yade-dev team mailing list archive

Re: Mandatory engines

 

> * HERE IS THE STORY:
>
> Say I want to implement a new geometry for bodies. I code pluggins
> that I needed (GeometriclModel, InteractingGeometry,Functors,
> GLDraw*,Preprocessor...) after discussing with Janeck
>
> I wanted to make some check on the displaying of this new geometry so
> I created a new PreProcessor that generates the wanted bodies. In a
> first stage, the 'lists' rootBody->engines and rootBody->initializers
> was copy&past from the TetrahedronsTest pre-processor. It worked fine
> at generation but  crashed during the first step of simulation (!)
>
> I decided to clear all engines and initializers...  it crashed during
> generation!
>
> * HERE ARE MY QUESTIONS:
>
> Can we have empty 'lists' of engines and initializers without crash
> (only to make some graphical checks)?
> If it does not, what are the engines (and initializers) that MUST
> absolutely be 'defined'?
Hi, There are no mandatory engines/initializers per se, but some engines
need PhysicalActions, that must be initialized with
PhysicalActionContainerInitializer. If you use the debug version and
have gdb installed, you will get backtrace after crash, which will tell
you (or us, if you can't make sense of it) what went wrong.

However, if you want just to create a simple simulation for testing, I
suggest that you use python for that -- see scripts/simple-scene.py for
an example. For testing display, you can only create the body, without
any engines, like this:

 b=Body()
 b.shape=GeometricalModel('VincentGeomModel',{'attribute1':value1,'attribue2':value2})
 b.mold=InteractingGeometry('VincentInteractingGeom',{'attr1':val1,'attr2',val2})
 b.phys=PhysicalParameters('BodyMacroParameters',{'se3':[x,y,z,1,0,0,0]})
 b.bound=BoundingVolume('AABB')
 o=Omega()
 o.bodies.append(b)

You can save that in somefile.py and run "yade-... somefile.py" or you
can type that to the python console. At this point, you should have your
body displayed in the 3d view.

Regards, Vaclav






Follow ups

References