Skip to content

Commit e3f21de

Browse files
committed
Implement dragging of extrude length by the end face. Also allows circular surfaces create by Lathe or Revolve to drag the previous group line that swept out the surface - this was unexpected but cool. Dragging other faces will need investigation as indicated in the comments.
1 parent 0aa9131 commit e3f21de

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/draw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ void GraphicsWindow::HitTestMakeSelection(Point2d mp) {
502502
uint32_t v = m->FirstIntersectionWith(mp);
503503
if(v) {
504504
sel.entity.v = v;
505+
Hover hov = {};
506+
hov.selection = sel;
507+
hoverList.Add(&hov);
505508
}
506509
}
507510
}

src/mouse.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ void GraphicsWindow::StartDraggingByEntity(hEntity he) {
6464
for(int i = 0; i < pts; i++) {
6565
AddPointToDraggedList(e->point[i]);
6666
}
67+
} else if(e->type == Entity::Type::FACE_NORMAL_PT ) {
68+
// || e->type == Entity::Type::FACE_ROT_NORMAL_PT ) { // needed for helix and revolve
69+
// Revolve is unstable because the point is on the axis. Helix drags in axial direction for same reason
70+
// || e->type == Entity::Type::FACE_N_ROT_TRANS) { // needed for linked objects
71+
// Linking fails possibly because the point[0] is never remapped in Group::CopyEntity
72+
AddPointToDraggedList(e->point[0]);
6773
}
6874
}
6975

0 commit comments

Comments
 (0)