Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Cadkunde.nl
in reply to: Cadkunde.nl

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.