leozide / leocad

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

Segfault on inserting parts #7

Closed pepijndevos closed 7 years ago

pepijndevos commented 7 years ago

I installed LeoCAD from the repos on Ubuntu 16.04, which worked fine, but turned out to be over a year old. Major sticking point was the lack of timeline for building instructions. So I went ahead and checked out d8bea07834546c26cbcdd89f4296d792b4eae0ee and compiled as per your instructions

sudo apt-get install libqt4-dev zlib1g-dev
qmake leocad.pro
make
make install

The first thing you notice when running the version compiled from source is that the preview panel is broken, showing a random piece of the underlying window. When you try to drag a piece into the window, it segfaults when you release it.

leozide commented 7 years ago

The head version is in the middle of a big change, the old parts toolbar is mostly deprecated but the new one isn't visible by default. You can bring up the new toolbar or compile the last release.

Any suggestions/comments on the new toolbar are welcome.

pepijndevos commented 7 years ago

Ah, I see. I indeed have two "Parts" toolbars, one of which does actually work. I'm not sure icons are actually better once you know the naming system (Am I looking at Technic pin or Technic pin with friction? Or maybe it's Technic pin with friction and slots after all...), but I guess with the incremental search it's not much worse either, and it helps if you don't know the name of a part.

I see a lot of progress has been made since the Ubuntu package :)

Maybe this is not the right place for suggestions, but a few minor annoyances that seem to be constant across LEGO CAD tools:

And I'm probably dumb, but I can't figure out how to select multiple things without dragging. Shift-click doesn't seem to do it. I also seem to have lost my colour palette. And rotate sometimes rolls the view instead. And after pasting a piece, the axis is inconsistent. The first time you drag it it's aligned with the global axis, upon reselection it's aligned with the axis of the part. (you might want both)

leozide commented 7 years ago

If you right click on the parts list you can choose to show only names, which is pretty close to the old tree (except that it isn't a tree anymore), and if you hover over a part, a tooltip with the name will appear so you can see which variation you're looking at.

I don't know much about how the various Linux distros update packages but Google shows me some fairly recent versions available for Ubuntu.

Copy and paste: I've had people ask both ways, maybe it should be an option.

Hold control and click to select multiple pieces (it's in the tutorial).

When dragging a new piece it will try to align with whatever is under the mouse.

pepijndevos commented 7 years ago

If you right click on the parts list you can choose to show only names, which is pretty close to the old tree (except that it isn't a tree anymore), and if you hover over a part, a tooltip with the name will appear so you can see which variation you're looking at.

Ah, useful. The tooltip has a delay, which makes it feel really slow (in practice it probably is faster than scrolling through everything`

I don't know much about how the various Linux distros update packages but Google shows me some fairly recent versions available for Ubuntu.

Ubuntu 16.04 gave me version 0.81

Copy and paste: I've had people ask both ways, maybe it should be an option.

Regardless of copy-paste, moving parts in different coordinate systems is useful. Stuff like that makes working with non-rectangular parts much easier. I struggled a lot yesterday working with those 53.13 degree liftarms.

Hold control and click to select multiple pieces (it's in the tutorial).

Ah, sorry. I followed the tutorial on the repository version, and gave up when I could not find the timeline view. (introduced in 0.82)

When dragging a new piece it will try to align with whatever is under the mouse.

Yes, it will put it on top of the piece under the mouse, which is nice. (except sometimes offset by a non-integer stud lenght) My point was that this is great for studded building where you place pieces on top of each other. For studless technic building, you mostly insert pins, axles, bushings, etc. so IMO it would be more useful to simply place them inside each other with their centres aligned.

leozide commented 7 years ago

Regardless of copy-paste, moving parts in different coordinate systems is useful. Stuff like that makes working with non-rectangular parts much easier. I struggled a lot yesterday working with those 53.13 degree liftarms.

I should write a tutorial about this, there are lots of small 'tricks' that affect what coordinate system is used.

Yes, it will put it on top of the piece under the mouse, which is nice. (except sometimes offset by a non-integer stud lenght) My point was that this is great for studded building where you place pieces on top of each other. For studless technic building, you mostly insert pins, axles, bushings, etc. so IMO it would be more useful to simply place them inside each other with their centres aligned.

This is a more complicated problem that involves knowing what kind of part you're dragging (axle/pin) and what kind of part is under the mouse (gear/technic brick). Right now all I do is take the bounding box of the 2 parts and match them, which works somewhat ok for simple bricks only.