It has been a while since I have blogged about sketches in Inventor and I thought the new Equation Curve command in Inventor 2013 would be a good occasion to diversify the topics covered on this blog, while at the same time highlighting a cool new feature.
A nice example I can think of is to experiment with ellipses. Inventor generates an ellipse starting from a center point and by defining the extents of the major and minor axis.
But how would you create an ellipse based on its two focal points and the minor axis? It all depends with what Inventor release you are working with.
You can now create an ellipse with two focal points with the new Equation Curve command by using an explicit polar equation. See this part file for an example.
The mathematical definition of such an ellipse based on its two focal points is
r = (B^2)/(A-C*cos(Q)) with Q between 0 and 360 deg
Fig 1: Ellipse with half focal distance C shown
A= half major axis
B = half minor axis
C= half the distance between the two focal points
r (radius) and Q(angle) being the polar coordinates of a point on the ellipse (radius and angle)
At the same time A, B and C have to respect the following equation:
A^2 = B^2 + C^2
I have chosen to implement this formula into the parameters dialog:
Fig 2: Parameters dialog takes care of relationship between A, B and C
Note: I added an index 1 to the parameters and used A1, B1 and C1 instead of A, B and C to avoid confusion with reserved parameter keywords.
The result of using such an equation curve can be seen below. The first focal point sits on the origin. To create the second focal point you could for instance mirror the first one along the minor axis.
Fig 3: Creating an ellipse via an explicit polar equation
In 2012 (or earlier versions):
There is not such a thing as equation curves in 2012 unfortunately. But you can quite easily create such an ellipse via the API in the older versions.
You can download here a sample VBA project that you can load in the VBA editor with the Load Project command.
To run the code, run the macro called ShowEllipseDialog
It creates an ellipse with one of its focal points positioned on the origin and the major axis aligned with the X-axis.
You need to have a XY sketch active before running the dialog. The two focal points are connected with a construction line.
B and C values can be freely chosen but A is automatically calculated based on the A^2 = B^2 + C^2 formula.
Fig 4: Creating an ellipse via the Inventor API