Rotation of CSG objects

Hi everybody,
I would like to create a structure containing a number of similar objects (e.g. ellipsoidal particles, but also others) which are embedded in the structure in various orientations. (You may think of it as a short fiber or whisker reinforced composite). Therefore I need to rotate the embedded objects.
I couldn’t find anything about rotation of objects in the documentation nor in the examples.
I am a newby in Netgen, so please apologize if the solution is trivial.
Thank you in advance for any help.
Cheers
Ingo

Hi Ingo,

that’s a feature which was on the todo list for a while, I just added it.

You can now specify a coordinate system by the origin and three unit vectors.
All following Pnt and Vec commands will refer to this system.

It will be in the coming nightly release, and certainly it will need some finetuning,

Joachim

Attachment: trafo.py

Hi Joachim,
Thank you very much for the quick reply and the immediate action!
Unfortunately I am a Windows user and try to avoid installing an Ubuntu System on a VM just for compiling ngsolve/netgen.
At least I know that the next Windows compilation will probably contain this feature.
Thanks again!
Ingo

Hi Ingo,
we also generate Windows binaries every night, you find them from the download page
Joachim

It worked!
Thank you very much. Attached, you’ll see the structure, a periodic particles shaped as cubes with truncated vertices.
Ingo

Hi,
I’m a beginner in Netgen. I wanted to create a 45 deg tilted ellipsoid. I wrote the command like the following to get an ellipsoid with 55 along major x axis and 50 along other two axis but rotated through 45 deg.

algebraic3d
solid ell = ellipsoid(0,0,0; 39,39,0; 35,35,0; 0,0,50);
tlo ell;

But this is not working. Can anyone help?

two of your axes are parallel !

guess you wanted something like
solid ell = ellipsoid(0,0,0; 39,39,0; 35,-35,0; 0,0,50);

Sir,
Thankyou very much. It worked!!!

Hi guys,

Is there any way that I can create ellipsoids using Python interface?

Bests,