Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API: General Section

Status
Not open for further replies.

ThomasH

Structural
Feb 6, 2003
1,192
Hi all

I have a question that hopefully somebody can answer.

I you have done any API programming in Femap you may know that there are methods to create cross sections for line elements. As far as I know these methods are based on the standard parametric cross sections, like a tube with radius and thickness.

But there is a general section based on a surface. Basically I can draw a cross section and Femap will calculate all the section data. I can also do that but what I would really like is to be able to program the cross section so the graphics in the model would look correct.

Is there a way to send the cross section directly into the beam properties shape dialog as a coordinate matrix or anything similar? I can't find any info on this in the manuals.

Best regards

Thomas
 
Replies continue below

Recommended for you

Hello Thomas,

Bar/beam shapes are dealt with at property level in FEMAP (just like in NASTRAN), so you'll find this in the property object. Use the "ComputeGeneralShape" method, it will compute all necessary properties and update your beam/bar property with regard to the surface you give in the "surfaceID" parameter.

For example let's say I have the following objects in my model and code:
- pr is a feProp
- vec1 = vector [0,0,1]
- surface #1 is a square
Then the following code will create a property with the surface defining its section (square bar):
(the first line is essential because FEMAP needs to know what type of property you're dealing with)

pr.type = FET_L_BAR
pr.ComputeGeneralShape(1,vec1,FSOR_UP,FSEV_AUTO,True, True, True)
pr.Put(pr.NextEmptyID)

Hope this helps!
 
Hello APav

I am actually trying to take things a bit further. I don't want to draw the surface at all. I want to define in by coordinates (four corners in a square) and somehow send that matrix into Femap. Do you know if that is possible?

Thomas
 
I'm not sure that's possible.

In the propertiy object's "additional property" you have the "outline" attribute which is similar to what you're looking for, but it might be read-only. Plus I'ld expect that FEMAP needs a whole lot more information like area, inertia...etc... which are computed when calling ComputeGeneralShape.

I would recommend this: use App.feBoundaryFromPoints to create a surface with an array of point coordinates, then give that surface to ComputeGeneralShape. Delete the surface afterwards if you want, in FEMAP v11.1 the nifty "TrackData" object will easily get you the surface's ID.
 
APav

I use the Prop.pval function to send all the property data into Femap. So far I have solved all the standard sections like tubes, W-flanges etc. But there are guite a few sections that are non-standard. That means they are not parametric in Femap. To compute the section data with Femap would be nice but that is actually not the primary idea, it is the graphic presentation (eye candy :)).

And I don't want to draw the sections I just want a dialog box and parameters. Then I can write a code that sends data into the general section. But it may be impossible today. I don't know but there is, in my experience, a lot of things in the api that is not in the documentation.

Hence, my question.

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor