Hello folks.
I'm completely blocked by this. Any simple way of solving it? It should be 
via a single command or such.
Or is this a bug that needs fixing?

On Tuesday, November 26, 2024 at 12:17:14 AM UTC Maksym Riabov wrote:

> Hello Chrono,
> I've ran into the problem that it seems impossible to extract ChNodeFEAxyz 
> positions from pychrono.
> The obvious thing would be: 
> ```
>  for ch_node in ch_mesh.GetNodes():
>                position = ch_node_xyz.GetPos()
> ```
> But GetNodes returns ChNodeFEA*base* which does not contain xyz position.
> I've tried typecasting, like this: ``` 
> for ch_node in ch_mesh.GetNodes():
>                 ch_node_xyz: fea.ChNodeFEAxyz = fea.CastToChNodeFEAxyz(
> ch_node)
>                 # ch_node = ch_mesh.GetNode(ch_node.GetIndex()) #and 
> something like this, hoping that it would return ChNodeFEAxyz
>                 position = ch_node_xyz.GetPos()
> ``` But the `ch_node_xyz.x`, `.y`, `.z` returns `nan`. 
> So, what can we do get positions of each node? 
> My usecase: given known AABB positions, find ones which a specific mesh 
> intersects. I believe it's possible to do through creating a separate 
> CollisionSystem instance and attempting to run it separately (I don't know 
> if it's possible), but then AABBs intersect that too.
>
> Is it possible to solve this in PyChrono? Examples only export positions 
> for visualization and that's not what I need.
> Thank you,
> Maksym 
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/40c97670-6dfd-444c-9d2e-21619d1f48dan%40googlegroups.com.

Reply via email to