- This topic has 2 replies, 2 voices, and was last updated 2 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Developer forum › Beam Load via API
Hi,
What do the “position1” and “position2” values mean when adding a beam load via the API? I can’t figure out how to calculate them correctly – not sure what they represent. I would have thought they are start x and end x of the beam length of the load applied, so I tried p1 = 0 and p2 = nfAPI.getMemberLength(xxb), but this does not seem to produce the results that I need. I wanted to place a uniform load along the entire beam.
Thanks in advance!
Just realized the getMemberLength returns 0 always for some reason, also I forgot to add -1 multiplier for first load value. I got it working implementing my own beam length calc, along the lines of:
tBeam.xlength = Math.Sqrt(((ne.xCoordX – ns.xCoordX) ^ 2) + ((ne.xCoordY – ns.xCoordY) ^ 2) + ((ne.xCoordZ – ns.xCoordZ) ^ 2))
Hello,
the getMemberLength returns 0 because its argument must be a member (see https://www.nextfem.it/api/html/M_NextFEMapi_API_addMember.htm) and has nothing to do with a single beam.
position1 and position2 are the initial and final position of loading. You can use 0 and nf.getElementProperty(beamID, “lun”).