AnyRefNode Problem

Dear AnyBody Support,

I am trying to attach some small segments protruding from several
vertebrae in the standing model example. In order to do this, I am
defining an AnyRefNode at the center of each vertebra, to which I will
attach the new segments.

I would like to make these nodes (and the corresponding joints) in a
new file, because I don’t want to have to go back and erase them from
the SegmentsLumbar.any file once I am done. I am being told “Wrong
owner class for ‘AnyRefNode’.” I realize that I need to have these
new nodes defined as a part of the original vertebral segments (ie.
L1Seg, etc.), but is there any way to do this in a separate .any file?

Here is the code that I am trying to add (it is referencing the given
SegmentsLumbar.any file of the standing model):

//Defines new nodes at the center of mass of each vertebra
AnyFolder CoMNodes = {

AnyRefNode L1CoMNode = {
sRel = …SegmentsLumbar.L1Seg.sCoM;
};
AnyRefNode L2CoM = {
sRel = …SegmentsLumbar.L2Seg.sCoM;
};
AnyRefNode L3CoM = {
sRel = …SegmentsLumbar.L3Seg.sCoM;
};
AnyRefNode L4CoM = {
sRel = …SegmentsLumbar.L4Seg.sCoM;
};
AnyRefNode L5CoM = {
sRel = …SegmentsLumbar.L5Seg.sCoM;
};
AnyRefNode SacrumCoM = {
sRel = …SegmentsLumbar.SacrumSeg.sCoM;
};

}; //CoM Nodes

Thank you very much,

Patrick Hughes
University of Michigan

Dear Patrick.

Yes, you can do this by defining a reference to the segment you want to add
the RefNode to. The following small piece of code should do what you want
and this you can just put in an include file:

// create a reference to the segment you want add the RefNode to
AnySeg &SegToAddTo = <path to segment, either full or relative>;

SegToAddTo = {
AnyRefNode Node = {
sRel = {0.0,0.0,0.0};
};
};

I hope this answers your question.

Best regards
Michael Skipper Andersen
The AnyBody Research Project.

----- Original Message -----
From: eve62160
To: anyscript@yahoogroups.com
Sent: Wednesday, June 18, 2008 9:04 PM
Subject: [AnyScript] AnyRefNode Problem

Dear AnyBody Support,

I am trying to attach some small segments protruding from several
vertebrae in the standing model example. In order to do this, I am
defining an AnyRefNode at the center of each vertebra, to which I will
attach the new segments.

I would like to make these nodes (and the corresponding joints) in a
new file, because I don’t want to have to go back and erase them from
the SegmentsLumbar.any file once I am done. I am being told “Wrong
owner class for ‘AnyRefNode’.” I realize that I need to have these
new nodes defined as a part of the original vertebral segments (ie.
L1Seg, etc.), but is there any way to do this in a separate .any file?

Here is the code that I am trying to add (it is referencing the given
SegmentsLumbar.any file of the standing model):

//Defines new nodes at the center of mass of each vertebra
AnyFolder CoMNodes = {

AnyRefNode L1CoMNode = {
sRel = …SegmentsLumbar.L1Seg.sCoM;
};
AnyRefNode L2CoM = {
sRel = …SegmentsLumbar.L2Seg.sCoM;
};
AnyRefNode L3CoM = {
sRel = …SegmentsLumbar.L3Seg.sCoM;
};
AnyRefNode L4CoM = {
sRel = …SegmentsLumbar.L4Seg.sCoM;
};
AnyRefNode L5CoM = {
sRel = …SegmentsLumbar.L5Seg.sCoM;
};
AnyRefNode SacrumCoM = {
sRel = …SegmentsLumbar.SacrumSeg.sCoM;
};

}; //CoM Nodes

Thank you very much,

Patrick Hughes
University of Michigan