A Point3d behaves much as an Array and vice versa.
You can make a point and adjust it's x/y/z values on the fly just as you can with an Array.
So
pt=Geom::Point3d.new()
or even
pt=ORIGIN.clone
gives you
Geom::Point3d.new(0, 0, 0)
then
pt.x=123.4
OR
pt[0]=123.4
gives you
Geom::Point3d.new(123.4, 0, 0)
A point or array will take .x ,y and .z; as well as [0], [1] and [2]...
This lets you read AND set values...
pz=pt.z
returns
0.0
and
pt.z=1
gives us
Geom::Point3d.new(123.4, 0, 1.0)
etc...
I suspect you are over complicating things...
To get the z axis of the current 'container', test if it's the model, and if so use Z_AXIS; if not use the container.transformation.zaxis
Let's assume we have an object in a container that is called 'obj'
if obj.parent==Sketchup.active_model z_axis=Z_AXIS else#it's a group or component z_axis=obj.parent.instances[0].transformation.zaxis end
IF you already know where the 'obj' is - e.g. you've made it inside a 'group' then it's even easier...
z_axis=group.transformation.zaxis