Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Siemens PLM Community
- NX Customization and Programming
- NX Programming & Customization Forum
- Re: Getting a radius of a cone

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-07-2019 02:39 PM

Hello everyone!

I am currently studying the properties of the conical face to automatically retreive some information from a model of mine. One key property I would need tp receive, would be the minim and maximum radius of the cone.

Does anyone know which radius the "askfacedata" of the cone gets? For the cones I tested, the value of this radius seems rather strange. Or is there maybe another way to get the minimum and maximum radius of the face?

I am looking forward to hearing from you!

PS: If not, is there maybe a way to get the length of the cone? An "askmaximum" distance function might also come in handy to calculate those values

Solved! Go to Solution.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-07-2019 03:16 PM - edited 05-07-2019 03:21 PM

One of the outputs of .AskFaceData is a point coordinate; for a conical face, this point lies somewhere on the axis of the cone. The radius that is returned represents the radius at this point (take a planar section of the conical face normal to the axis, passing through this point and measure the radius).

If the face is a result of a cone feature, you can use a cone feature builder object to query the top and bottom radius.

If the face is a result of a through curve or revolve feature, you might be able to get or calculate the radii from the section curves.

If all you have to work with is the face, you could get the edges from the face and test to see if they are arcs. If the edges are not arcs, you could use .AskFaceProps to get the radius at a particular parameter location on the face. Finding the correct parameter locations in this case could be tricky.

Finding the length of the cone: one potential method would be to use the .AskBoundingBoxAligned method - pass in a csys where one of the axes is parallel to the cone axis and read the box size along that axis. Or, use "measure extremes" along with the cone axis to calculate the length.

Highlighted
#

Re: Getting a radius of a cone

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-09-2019 01:54 PM

When speaking about the BoundingBox I would have one more question: The AskBoundingBox will get the bounding box in the global coordinate system and AskBoundingBoxAligned will provide the bounding box in the coordinate system, I provide, right? But there is no such function to get a minimum box around the body, that is not aligned to anything or just one axis right?

Re: Getting a radius of a cone

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-09-2019 04:11 PM

@SteveU wrote:

When speaking about the BoundingBox I would have one more question: The AskBoundingBox will get the bounding box in the global coordinate system and AskBoundingBoxAligned will provide the bounding box in the coordinate system, I provide, right?

Correct.

@SteveU wrote:

But there is no such function to get a minimum box around the body, that is not aligned to anything or just one axis right?

There is no function that will find the orientation of the absolute smallest required bounding box for a given object.

An orientation can be defined given 2 vectors (2 axes of the csys). Given the known axis of the conical face, you could use **.AskPerpendicular** to find an axis perpendicular to the one given. Using these 2 vectors, you can create a csys for use with **.AskBoundingBoxAligned**. Alternately, you can create an orientation given an origin point and an axis direction. So, technically, yes - you'll need more than 1 axis to find the bounding box; but the API has the tools to get you there.

Follow Siemens PLM Software

© 2019 Siemens Product Lifecycle Management Software Inc