Jump to content
Mr. Adam Kaplan

Getting Area from Section Group

Recommended Posts

Hello,

 

 

I have boat hull that I am trying to get data from. I have the hull defined, along with a section group defined. I wish to retrieve the area from each offset, however, when I do so, I either get zero as an answer or something incorrect. The command I am using is

MySections.getSections().at(X).getArea(0,0,Y,Z)

Where X is the offset I wish to retrieve the data from. I am also unsure of what values Y and Z should be, I have been using Y as the lowest point on the draft, and Z as the waterline.

 

EDIT: My hull is defined with the aft at the origin, and the hull defined along the X-axis.

 

Thanks,

 

 

Adam

Share this post


Link to post
Share on other sites

Hi Adam,

 

what you did is almost correct. Unfortunately you just selected the wrong axis for the area calculation, so the zero result is correct, but not wat you wanted.

 

The correct command would be:

MySections.getSections().at(X).getArea(2, 0, Z0, ZWL)

The first argument defines the axis for the area calculation, in this case 2 for the z-axis.

The second argument sets the area plane, here X (Y,Z).

 

The last two arguments specify the start and end position for the calculation with respect to the selected axis, in this case from the lowest point (i.e. Z0=0) to the waterline (ZWL=draft).

Of course you could compute the area of the complete section instead of only the submerged part by setting these bounds higher. Or use the y-axis instead for some reason.

 

post-19-0-50008700-1408437978_thumb.png

 

 

 

Cheers,

 

Sebastian

 

 

edit: typos

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi,

I have a question about the evaluation of the area of a generic section.

 

I would like to know if it is possible to extract the global area of a closed B-Spline using the command section.getArea. I tried to obtain this for a generic section I'm working on. However, when I did so, I obtained zero as a result.

 

Thanks.

 

Simone

Share this post


Link to post
Share on other sites

Note that the getArea() command comes with some arguments that you have to provide:

 

  • abscissa axis
  • plane (axis ID that is normal, for x-axis it is 0, for y it is 1, for z it is 2)
  • parameter ranges (default is [0,1] i.e. probably no need to set specific values)

 

For instance: curve.getArea( 0, 2 ) for the integral area in the xy-plane.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...