leozide / leocad

A CAD application for creating virtual LEGO models
https://www.leocad.org
2.46k stars 206 forks source link

Improve auto placement/contextual snapping #707

Open sheepo99 opened 3 years ago

sheepo99 commented 3 years ago

Problem I like LeoCad a lot because of how simple it is and how well it works with Linux, but I find myself having to rely on Stud.io every now and then simply because part placement can so often be frustrating. Whereas in Stud.io parts automatically rotate and adjust themselves upon snapping, LeoCad still has a very finicky manipulation system that can make assembling a model a much slower task than if done on Stud.io.

Solution To put it simply, I would like snapping to adjust and rotate the part automatically relative to its to position to another part, the same way Stud.io does it. I'm aware this probably isn't easy, but I find it an essential ste to make LeoCad a true user friendly program in the future.

nathaneltitane commented 3 years ago

Problem I like LeoCad a lot because of how simple it is and how well it works with Linux, but I find myself having to rely on Stud.io every now and then simply because part placement can so often be frustrating. Whereas in Stud.io parts automatically rotate and adjust themselves upon snapping, LeoCad still has a very finicky manipulation system that can make assembling a model a much slower task than if done on Stud.io.

Solution To put it simply, I would like snapping to adjust and rotate the part automatically relative to its to position to another part, the same way Stud.io does it. I'm aware this probably isn't easy, but I find it an essential ste to make LeoCad a true user friendly program in the future.

I must admit @sheepo99 has a very good point here - some of my fellow builders have been using stud.io as well and blow out complex models in no time.

I for one have taken a liking to LeoCAD as well due to its simplicity and for the sheer fact that it is readily available and compatible with linux based systems.

I woudl like to point out that there are two very relevant and still very present issues: Even when preselecting the part over which a new part will be placed, Leocad sometimes fails to detect proper orientation, or even depth: placmetn may be perpendicular or even merged with previous part.

Another issue hasa to do with correcting this previous behavior: when a part is placed, the orientation of that part and the transformations related to it are still confusing (even for a long time user such as myself): i use keyboard arow keys and their combination shortcuts to rotate and translate pieces quickly as I modify their properties from within the Parts Properties widget. I will often have to have several stabs at choosing the right Arrow/combination to get the part oriented or moved in the right direction due to the absolute/relative reference still not being clear or functioning as it should?

@leozide I believe that this topic has seen some recurrence in the past month well enough times to maybe draw up some kind of framework on how to maybe implement something manageable in the near future? It seems to have become a (now essential) feature seems to draw the attention of users and be the decisinve factor in their workflow.

sheepo99 commented 3 years ago

To be perfectly honest, I feel this alone is what makes Stud.io the go-to option for virtual Lego design these days. Everything else in that suite is bloat.

nathaneltitane commented 2 years ago

@leozide ::bump:: - could we implement a simliar mechanism to what has been added to make flex parts function correctly, but made to work with stud positions rather?

morphles commented 1 year ago

The absence of piece to piece snapping is IMO catastrophic thing. Having used stud.io, on linux even with some weird shit happening there, working without it is like using it with my feet, just a bit slower. Esp if you wan to do something "advanced", like SNOT building, it becomes royal pain....

nathaneltitane commented 1 year ago

The absence of piece to piece snapping is IMO catastrophic thing. Having used stud.io, on linux even with some weird shit happening there, working without it is like using it with my feet, just a bit slower. Esp if you wan to do something "advanced", like SNOT building, it becomes royal pain....

i can agree on it being a very satisfying and time efficient feature, but then again, relying on it is also a matter of personal experience... been using leocad for over a decade now and frankly, really don't mind its absence.

my comment does not detract from the fact that if leocad wishes to be 'state of the art' a roadmap to such feature should be taken in consideration, and that all depends on @leozide or any other contributor and their availability to implement such a feature.

nathaneltitane commented 1 year ago

@rsbx i'm curious to know: de we have an idea as to how stud.io implements this?

rsbx commented 1 year ago

Sort of. This is all from memory, so I'm going to be a bit ambiguous.

1) An academic did a paper and proof-of-concept implementation of it a number of years ago that's worth a read if you can find it (I forget how I found it).

2) The author of another LDRAW CAD program seems to have implemented it and possibly expanded on the per-part data need. Check the LDRAW.org wiki; it actually has a page there! The actual per-part data is available as an archive of "shadow" files from his web site.

3) The tricky part is in the efficient searching for what to snap to and how to snap. That code does not appear to be available last time I went looking. But it might be worth asking.

On 12/19/22 13:05, N Λ T H Λ N E L wrote:

@rsbx https://github.com/rsbx i'm curious to know: de we have an idea as to how stud.io implements this?

— Reply to this email directly, view it on GitHub https://github.com/leozide/leocad/issues/707#issuecomment-1358039914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECJNEZ4UVSOEXXXUZ46M3WOCPU5ANCNFSM44AZSTQQ. You are receiving this because you were mentioned.Message ID: @.***>

rsbx commented 1 year ago

A followup:

I just spent the morning and early afternoon trying to find the paper I mentioned above without success. I believe it's from 2002 and associated with a student project, LeoCAM, at a Spanish university but all of the links are now dead.

Another related project is SR3D Builder by Sergio Reano but I could only find (old) Windows installer links.

LDCad by Roland Melkert is the other LDraw CAD program I was referring to and it still seems "live". There's also a Github repository for the connection metadata @ RolandMelkert/LDCadShadowLibrary.

There are a few (old) form topics on LDraw.org about standardizing the connection (meta)data that are worth a read; keywords are "lcd" and "connections".