I’m trying to get a vector direction from two given parallel lines.
What I’m basically trying to achieve is adding an offset at the top and the sides of the specified amounts.
Starting with this:
Trying to end up with this.
The side offsets are easy because I can get the vector from the top or bottom edges.
If I get the direction like this, the offset is on an angle, and the offset becomes too narrow if the angle is steep.
vector = bottom.start.position - top.end.position
cakrupp
2
I would use guides to do this. Select the tape measure tool and click on one of edges. Pull out a guide from the edge.
.ENTER THE OFFSET DISTANCE, HIT ENTER. REPEAT ON ALL EDGES. TRACE THE FINAL LAYOUT WITH THE LINE TOOL CONNECTING INTERSECTIONS OF THE GUIDES.
THE GUIDES CAN ONLY BE PULLED OUT PARALLEL TO THE EDGE.
DON’T KNOW WHY, BUT GUIDES ARE THE MOST IGNORED TOOL IN SKETCHUP. I USE THEM CONSTANTLY.
OK I got it.
top_offset_distance = 5.5
v = bottom.end.position - top.start.position
v1 = top.end.position - top.start.position
v.length = top_offset_distance / Math.sin(v1.angle_between(v))
new_point = top.start.position + v
This is in the Ruby Api category.