## Existing DimensionLine.Aligned calculate location of line start and end

CSGemini
9/6/2022 2:13 PM

Hi Wout,

I had seen an existing post and figure the following:

When adding a DimensionLine.Aligned we specify the ExtensionLine1StartPoint and ExtensionLine2StartPoint. I understand these relate to the tip of the arrows of the dimension line. Then the DimensionLineLocation is specified. I understand the DimensionLineLocation is a single point and effectively specifies the distance of the actual dimension line from the arrow tips.

If the above is correct which is how its working for me,my question is:
Given an existing dimensionLine.Aligned on a drawing what would you say is the best way to get back to the 3dpoints of the ends of the actual dimension line ?

I hope that makes sense...

Wout
9/6/2022 2:24 PM

Hi,

It's a bit different: the extension line points define what the dimension is measuring, and the dimension line location is a point somewhere on the dimension line, which usually is some distance away from the line segment between the extension line points.

For the aligned dimension, the dimension line direction vector is determined by the line segment between the extension points. So you take the unit length perpendicular vector (in the plane determined by the dimension's z-axis), and project the DimensionLineLocation - ExtensionLine1StartPoint vector onto the this perpendicular vector, and you know the distance between dimension line and the line between the extension line points.

- Wout

Wout
9/6/2022 2:26 PM

But normally you don't need to know where the arrows end up, you just specify what you want to measure with the extension line points, and then specify a dimension line point to place the dimension line.

- Wout

CSGemini
9/6/2022 2:34 PM

I think i'm getting it.

What i'm trying to do is avoid a dimension line overlapping an existing dimension. Ending up going down a route of identifying if the dimension line getting added is overlapping the dimension line of an existing one and if it does overlap moving it slightly. Bit of an iterative process.