Jump to content
Mr. BUGRA UGUR YAZICI

how to take dimension angle as a variable input in feature programming?

Recommended Posts

Hey,

 

I wonder if there is any possible way to assign dimension angle as double in FDimensionAngle feature?

 

I need to use dimension angle value in another function. But as far as i could see there is no such function defined in FDimensionAngle class.

 

Best Regards.

 

 

Share this post


Link to post
Share on other sites

Hey Bugra,

 

I don't really understand if you want to assign a dimension on an angle or if you want to have the dimension of the angle.

 

Theoretically, the linear and angle dimensions are only for visualization, so, I suggest you to find another way.

 

If you want, you can create a angle dimension using this sintax:

 

dim1.setStart([-3,0,0])
dim1.setPosition([0,0,0])
dim1.setAngle(angle)
dim1.setEnd([0,0,4])

 

you need to assign also an end, but the end has no influence on the angle.

 

But, later, you can't have the angle as  double. There's no dim1.getangle(), because the dimensions are only for visualization.

 

But you can easily calculate the angle using the tangent method.

 

You can calculate the tangent of the two segments and than use the command atan()

 

Otherwise, you can use directly the command atan2(point1, point2), that gives you the angular dimension between the two points.

 

Attention that the value is returned in degree. If you want the radiant, you have to use atan2(point1,point2,false).

 

I think that now you can have the value of the angle in a very fast way.

 

If you have problem, please ask.

 

Cherres,

Carlo

 

 

 

 

 

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...