- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm glad that it worked as expected. I just used a vector to translate a point in this case. The function to place the diameter dimension still takes a point as an argument.
A vector has a magnitude (length) and a direction. What the code does is that it first gets the vector representing the relative difference in position between the point of our geometry intent (the point that our arrow for the dimension will attach to) and the centerpoint of the circle. this gives us a direction straight to the left in this case and a magnitude being the radius of the circle. I then scale the vector by a factor of 0.3 , dubble the length in X direction and add the previous x-value of the direction to the y value of the vector. It's all just operations to get the point to where I think it wood look good. Then I take a copy of our intent point and translates it by this vector, giving me a point at a good relative position to the intent point in my opinion. That is the point I then use as position for the dimension text.
I hope this made some sense to you ![]()
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website