07-28-2023
12:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-28-2023
12:14 AM
This is what I was working on:
Dim Length As Double = firstLine.StartSketchPoint.Geometry.DistanceTo(lastLine.StartSketchPoint.Geometry)
Dim LengthVector As Vector2d = tg.CreateVector2d(endpoint.X - startpoint.X, endpoint.Y - startpoint.Y)
Dim ratio As Double = firstOffset / Length
Dim vec As Vector2d = LengthVector
vec.ScaleBy(ratio)
Dim pnt As Point2d = tg.CreatePoint2d(startpoint.X + vec.X, endpoint.Y + vec.Y)
sketchPoints.Add(pnt, True)
This doesnt work yet and I see in your post you also mention using a percentage.
Thing is, I feel like im approaching it too difficult. No experience with vectors yet, i would have expected to be able to get use the startpoint, the direction of the line and give a magnitude (50mm) and done.