×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How To Extract Cylinder Feature Data

How To Extract Cylinder Feature Data

How To Extract Cylinder Feature Data

(OP)
I am trying to extract information from selected cylinders in a model and get the following information for each:
    Point of origin
    Diameter of Cylinder
    Direction
    Height of Cylinder

My process is as follows:
1. Prompt the user with a "MESSG" to select cylinders for data extraction.
2. "MASK" the entity selection for Solid (70) only.
3. Use the "IDENT" function to store the cylinder data into an array
4. Loop through the array.
5. Extract the "ORIGIN XYZ", Direction, Diameter and Height
6. Write this data to a text file

I have a handle on everything except for step # 5.

I can find all of this information by using the "Feature Browser" on the "Information" menu in UG Modelling but cannot seem to find the GRIP functions that provide access to this data.

If anyone can point me in the right direction. I would sure appreciate it.

Thanks a lot

RE: How To Extract Cylinder Feature Data

The GRIP manual should give the information as to how the array is formatted with the information you are looking for.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
Sr IS Technologist
L-3 Communications

RE: How To Extract Cylinder Feature Data

Okay, I looked in my GRIP manual and it canot be done directly. GRIP doesn't know too much about solid bodies beyond their existance and mass properties.

There are some other methods that can be used to get the information you need. Create circles on the top and bottom face edges and obtain the diameter, center of one end and claculated height from these. I don't know what value the direction is to your program, but a vector could be constructed between the center points.

If you really want to obtain information from solid bodies, you will need to upgrade your programming skills to UG/Open API programming or the newer .net journalling.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
Sr IS Technologist
L-3 Communications

RE: How To Extract Cylinder Feature Data

(OP)
Thanks looslib,

I've been searching all over the manual trying to find out how to get the info.
This is my first GRIP program so I was hoping there would be a straight forward way to get this data.I've learned a lot of other things about the GRIP language in the process of searching though.

I need the direction because I can use the origin XYZ coordinate and the direction to determine where the end of my cylinder needs to be based on it's height.
These are parameters that get passed to another program via a text file in the following format:
CYL = X1,Y1,Z1,X2,Y2,Z2,DIA1,DIA2.
I know that if my cylinder's X origin is 0 and it is in +X direction, 2" high, then my X2 must equal 2. Some models have multiple cylinders in different directions but they are mainly straight so in this case Y1 will equal Y2 and Z1 will equal Z2.

We are just in the process of upgrading to NX3 so I will look into the journaling.

Thanks again for the reply. I really appreciate your input

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources