FlorianPommerening / FingerJoints

Fusion 360 add-in for creating finger joints
122 stars 10 forks source link

Option to work on parts next to each other #16

Open tiktuk opened 2 years ago

tiktuk commented 2 years ago

Hi,

First of all, thanks for a great addin! I've been looking for this for years and yours is the first solution to this fundamental, tedious task :) !

One idea: It would be great if it was possible to create joints between parts that are next to each other, like here:

Screenshot 2022-02-22 at 00 13 45

I find it cleaner to design the parts like this, so I'm free to decide on how to join them later. It also looks neater not having the overlaps in the model at this stage.

Either way, your addin is much appreciated!

FlorianPommerening commented 2 years ago

I know what you mean; building overlapping parts is not that nice.

The problem non-overlapping parts is that I would have to extend them into each other before creating the joints and it is difficult to know which face(s) of which part to extend in which direction and for how long. It might be possible for completely rectangular pieces meeting at a right angle as in your screenshot but for other angles and other shapes, this is tricky.

I might add a special case for rectangular pieces because I also would like to construct the pieces without overlap and rectangular pieces meeting at right angles are probably the main use case. But it will not be something I will get done quickly.

tiktuk commented 2 years ago

Yeah, rectangular joints are probably more than 95% of the cases I would assume.

But what about selecting a body and a face instead of two bodies? The body A and the face B below. B will get notches that will extend into A where they will be subtracted. This is how I do it manually. Isn't this more disambiguous than relying on overlaps?

The face would be known and the direction would be outward from that face (I assume it's possible with the API to find out what is into and out from the body of the face B.)

Should be able to work for non-rectangular joints as well (with some additional projection/combining, as mentioned in #13).

Fingerjoint proposal
FlorianPommerening commented 2 years ago

The way I can imagine this feature is that the addin behaves as it currently does if the bodies overlap. If they don't, then it checks if it can figure out how to create the overlap by extending one of the parts. This step would give up for everything other rectangular pieces and right angles.

Once the user selects two bodies, I don't think it is difficult to automatically find the face B: it is the one that is coplanar with a face of body A and at least partially contained in this face of A. I would prefer selecting two bodies over selecting a face and a body because the face B will usually be hidden, so selecting it is a bit tedious (you'd have to toggle the visibility of A for example).

The more difficult exercise is to find out in which direction the face should be extruded and by how much. If we assume rectangular bodies meeting at a right angle, we could probably look for "the other side of A" by looking for a face of A that is parallel to face B. We could then extrude in the direction perpendicular to this face by the distance between it and face B. I don't think this will work for angles other than 90 degrees, though. And for non-rectangular bodies, this will may fail in very strange ways.

Ahh, but what if face B is larger than part A? We probably want to extend only the part that touches A. This is going to require more thought.

tiktuk commented 2 years ago

Once the user selects two bodies, I don't think it is difficult to automatically find the face B: it is the one that is coplanar with a face of body A and at least partially contained in this face of A. I would prefer selecting two bodies over selecting a face and a body because the face B will usually be hidden, so selecting it is a bit tedious (you'd have to toggle the visibility of A for example).

Yeah, that would be nice. Definitely good not having to toggle visibility. That's what I do now and it's a bit annoying. Another option is to do like when creating joints: The component selected first is made (almost) invisible, so it's not in the way.

The more difficult exercise is to find out in which direction the face should be extruded and by how much. If we assume rectangular bodies meeting at a right angle, we could probably look for "the other side of A" by looking for a face of A that is parallel to face B. We could then extrude in the direction perpendicular to this face by the distance between it and face B. I don't think this will work for angles other than 90 degrees, though. And for non-rectangular bodies, this will may fail in very strange ways.

Ahh, but what if face B is larger than part A? We probably want to extend only the part that touches A. This is going to require more thought.

An option to select faces could solve this too, the user would just have to create a sketch with a line dividing the (larger) face in two. Then the relevant part of the face could be selected.

Ideally there wouldn't be many different behaviours depending on the shape of the geometry, of course. Could quickly get hairy both to use and code..! (If I have a 90 degree corner the boards should meet each other, if it's a 91 degree corner they should overlap..)

That's why I still kind of like the idea of selecting a face and a body. As far as I can tell it could work for both the rectangular, non-rectangular and face-B-is-larger-than-part-A case. And it would be just as user-friendly if the selection of part A made it invisible. (And with fewer heuristics to code.)

Just some thoughts of course, thanks again for coding it in the first place 👍 !

FlorianPommerening commented 2 years ago

I don't think selecting a face would solve the issue of finding the direction and length to extend. For example, if parts meet at a 60 degree angle, and you extrude in the direction perpendicular to the selected face, the part would not remain a rectangular body.

Anyway, I'll keep your suggestions in mind and will try to find something that works. It will take a while, though. I just don't have the time to work on this often.