- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
programmatically complex sketch
Hi,
I'm trying to develop a routine to generate a complex sketch. This sketch (in different variations) will be used a number of times within the final model and in order to gain time I'm trying to develop a generic routine that, based on several input parameters, will execute the work for me.
The basic sketch is an airfoil and this is generated using 181 points and an spline. Once the airfoil is generated, a number of holes should be generated inside the airfoil following a set of formulas that will determine the size and shape of the holes depending on the airfoil thickness and position within the airfoil.
I'm looking for the APIs needed to support the calculation of perpendicular lines, intersections between lines and circles, etc. given an origin point (one of the 181 points of the outer "skin" of the airfoil. I've been trying to understand how vectors and matrixes support me on this specific task without success.
I would appreciate to receive some samples on how to programmaticaly do a complex sketch based on inputs.
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Riccardo,
I dont know if you have taken a look into the examples in the API/Programming help in Inventor. It seems they may give you some ideas.
I hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Rordigo,
thanks for your kind answer, I did not follow that specific route but rather turned to Vectorial math to determine the different points I need.
Basically, very summarized:
Given the "outer" SPLINE, I'm able to interate on the different handles of the spline. From these handles, I'm able to find out the different tangents to said handles and from there, determining the unit vector for each handle is trivial.
Once I have the vector, I'm able to determine any other vector to a given angle thru Vectorial Maths. Specifically, the "normal" or "perpendicular" vector is as simple as to swap the X and the Y components and change one of their signs (X,Y) becomes (-Y,X).
As I now have a new vector (the -Y,X), a distance to produce the "inner" spline and a starting point (the original point from the outer spline), I'm able to determine via scale where the point for the inner spline should be.
From that point over, to generate a new spline is trivial, once you reordered/removed some of the points to avoid nasty overlaps. The new points are exactly at the defined distance from the outer skin and the profile is perfectly identified.
As mentioned. I'm not finding much info in regards of the topic, and had to use a little imagination and go back to my daughter's math and physics books to determine what exactly could be done with vectorial and matricial calculations in 2D and 3D space...
regards,