LDCad 1.6 suggestions/plans


Re: LDCad 1.6 suggestions/plans
Roland Melkert Wrote:I have been working on the 1.6 hotkey configuration stuff during my vacation it is now possible to reassign any 'action' in the program. I could add some actions to control the camera (key less by default) which you can then assign keys to yourself using the below new dialog.
Would it be possible to assign the A key to rotate a brick around the y-axis?
I am so used to MLCad that I constantly pres A to rotate a brick....
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
Don't know if this has been asked before, but would it be possible to compile LDCad for Mac?
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
Jaco van der Molen Wrote:Would it be possible to assign the A key to rotate a brick around the y-axis?
I am so used to MLCad that I constantly pres A to rotate a brick....
Yes using the new dialog you can change the keys for each of the editing pin mode's.

It currently only allows for optional rotation around the current plane, but I could easilly add abs rotations like I've already did for the movement stuff, like so:

   
Reply
Re: LDCad 1.6 suggestions/plans
Jaco van der Molen Wrote:Don't know if this has been asked before, but would it be possible to compile LDCad for Mac?
I suspect it will work almost at once as the mac like Linux is unix based meaning the Linux variant of things probably also work for the mac. This and the fact the 3rd party application shell library I use (wxWidgets) supports the mac.

But the problem is I don't have a mac at the moment. I have been trying to cross compile but haven't much luck with that so far.

If anyone has some pointers on how to setup cross compiling (e.g. on a dedicated linux vm image) I'm open to suggestions.
Reply
Re: LDCad 1.6 suggestions/plans
Roland Melkert Wrote:
Jaco van der Molen Wrote:Would it be possible to assign the A key to rotate a brick around the y-axis?
I am so used to MLCad that I constantly pres A to rotate a brick....
Yes using the new dialog you can change the keys for each of the editing pin mode's.

It currently only allows for optional rotation around the current plane, but I could easilly add abs rotations like I've already did for the movement stuff, like so:
I've been through every menu, but am unable to find the Hotkey Management dialog. Where is it? :-)
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
It's not in the current release yet (1.5).
It's being worked on. It'll be a new feature in the 1.6 release Wink
Reply
Re: LDCad 1.6 suggestions/plans
Roland Melkert Wrote:I have been working on the 1.6 hotkey configuration stuff during my vacation it is now possible to reassign any 'action' in the program. I could add some actions to control the camera (key less by default) which you can then assign keys to yourself using the below new dialog.

[attachment=1983]

I was hoping I could turn this behavior on/off with a single switch without having to reset all the key bindings each time. Obviously, I would not want this behavior 100% of the time.

Will I be able to toggle groups of command bindings on/off at one time?
Reply
Re: LDCad 1.6 suggestions/plans
Merlijn Wissink Wrote:It's not in the current release yet (1.5).
It's being worked on. It'll be a new feature in the 1.6 release Wink
Oops, my mistake. This is about 1.6.. :-)
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
Michael Horvath Wrote:I was hoping I could turn this behavior on/off with a single switch without having to reset all the key bindings each time. Obviously, I would not want this behavior 100% of the time.

Will I be able to toggle groups of command bindings on/off at one time?
I have been thinking about making the hotkey 'sheet' switchable you could use that to temporary use different keys as long the switch can be done easily / fast maybe trhough a hot key of its own. I'll see what I can cook up.
Reply
Re: LDCad 1.6 suggestions/plans
Thank you for a good point, Jaco!

Roland, can you make LDCad know this syntax, please? I believe the GUI may be what you planned (groups visible for a range of steps), just use the syntax LPub knows.
Reply
Re: LDCad 1.6 suggestions/plans
I have two other requests: sorting bricks (by height) and something like autostepping.
(Sorry, too used to mlcad....)

Enhance autostepping by determination if a brick is attached.
This is often the case when using SNOT. If a brick is attached to say a headlightbrick, the height of that brick is lower then the height of the headligth brick. Sorting by height will mean we get floating bricks.
If LDCad could solve that it would be great. Since it has part snapping I guess one could test if a brick is attached?
Get it? :-)
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
What a brilliant tool. It's the opposite of Buffer Exchange. This will make things a lot easier for me when making subfiles that include a cable (PF Motor etc.) Up until now what I would do was insert a Buffer Exchange, add the motor with a short cable, add all the new parts, retrieve the buffer, add a new motor with a cable that connects to e.g the WeDo USB Hub (longer and twisted) and also add a copy of all the parts that were added since the previous buffer exchange. In LPub I would then hide all those new parts as well as the last step in that subfile.

It looks like this will allow me to do the same thing without Buffer Exchange and directly inside LPub
Reply
Re: LDCad 1.6 suggestions/plans
As you wrote, this is the perfect tool to change cable routing at various point of the instructions. I used it in some instructions
Reply
Re: LDCad 1.6 suggestions/plans
I've tried to use the command and ran into a problem:

I used the command in a subfile and hid the first motor I inserted.
When I used the subfile in the mail file both motors appeared.
Is this the expected behaviour? Am I doing something wrong?
Reply
Re: LDCad 1.6 suggestions/plans
  • Is it just me or are there other people that get frustrated on how the menus work? There is no visual aid that suggest that for example unsplit a view you have to select:

    View -> Editing views -> Split -> Unsplit

    I really miss the arrow indicating a submenu or the three dots for a dialog ... the cascading submenu opening in an attached menu window and not all in the same box, getting lost ...
  • I further miss that there is no icon for the grids or an indication which step grid I'm currently using (before I start moving around and the grid shows up).

  • I miss that Front, Left, Right, ... icons I got used to in LDView, which are much faster then the compass in the bottom left-hand corner.

Sorry for the rant, it's just that I've got the impression to get nowhere and didn't no why,

w.
LEGO ergo sum
Reply
Re: LDCad 1.6 suggestions/plans
Willy Tschager Wrote:
  • Is it just me or are there other people that get frustrated on how the menus work? There is no visual aid that suggest that for example unsplit a view you have to select:

    View -> Editing views -> Split -> Unsplit

    I really miss the arrow indicating a submenu or the three dots for a dialog ... the cascading submenu opening in an attached menu window and not all in the same box, getting lost ...
  • I further miss that there is no icon for the grids or an indication which step grid I'm currently using (before I start moving around and the grid shows up).

  • I miss that Front, Left, Right, ... icons I got used to in LDView, which are much faster then the compass in the bottom left-hand corner.
The menu system indeed could use some improvements. the main reason it is as it is comes from the fact I initially wanted them to be pin-able and visible in OpenGL fullscreen mode. I also wanted to include none simple text item ones at some point (e.g. the compass it self) but this never took off.

I'll try to find a way to add at least the '>' arrows to submenu items, '...' is already used for dlg ones unless I forgot one.

I'll also look into making it possible to (optionally) let them act more like normal windows by opening submenus alongside their parents etc.

As icons for left/top etc those you can add to the menubar by providing png images your self.


Willy Tschager Wrote:Sorry for the rant, it's just that I've got the impression to get nowhere and didn't no why,w.
Don't worry, All comments / suggestions are welcome / appreciated.
Reply
Re: LDCad 1.6 suggestions/plans
The non-native look and feel is probably my biggest impediment with LDCad. I guess I'm more resistant to change than I thought or I'm just getting old.
Reply
Re: LDCad 1.6 suggestions/plans
Orion Pobursky Wrote:... or I'm just getting old.

Welcome to the club!

w.
LEGO ergo sum
Reply
Re: LDCad 1.6 suggestions/plans
Yup. Average age at work is 23. I'm quite a bit more than that...
Reply
Re: LDCad 1.6 ROTSTEP feedback
I've been working on adding ROTSTEP support to the 1.6 version.

But I have never used the meta myself so I would appreciate some feedback / info about it.

This is what I got so far: screenshot

I find the angle properties very limiting, (especially the z control as shown in the picture).

Maybe I'm using it wrong, so what values are used often / in normal situations?

Also does anyone know the best/easiest way to extract the angles from an existing rotation matrix?

This is what i use for setting up the matrix (as described in the MLCAD spec doc).

Code:
void TLDStepMetaLine::getRotStepRotationMatrix(const double xAngle, const double yAngle, const double zAngle, TGLMatrixd &matrix) {

  //Uit rotstep spec doc
  const double wx=deg2Rad(xAngle);
  const double wy=deg2Rad(yAngle);
  const double wz=deg2Rad(zAngle);

  const double s1=sin(wx);
  const double s2=sin(wy);
  const double s3=sin(wz);

  const double c1=cos(wx);
  const double c2=cos(wy);
  const double c3=cos(wz);

  matrix.initFromLDraw(
    0.0, 0.0, 0.0, //xyz
    c2*c3, //a
    -c2*s3, //b
    s2, //c
    c1*s3+s1*s2*c3, //d
    c1*c3-s1*s2*s3, //e
    -s1*c2, //f
    s1*s3-c1*s2*c3, //g
    s1*c3+c1*s2*s3, //h
    c1*c2); //i
};

Any feedback / help is welcome.


Attached Files Thumbnail(s)
   
Reply
Re: LDCad 1.6 ROTSTEP feedback
Roland Melkert Wrote:Also does anyone know the best/easiest way to extract the angles from an existing rotation matrix?
I think I solved this, but if anyone knows a better method...

Code:
void TLDStepMetaLine::getRotStepAngles(const TGLMatrixd &matrix, double &x, double  &y, double &z, const int roundTo) {

  x=atan2(matrix.array2D[2][1], matrix.array2D[2][2]);

  const double c2=sqrt(SQR(matrix.array2D[0][0])+SQR(matrix.array2D[1][0]));
  y=atan2(-matrix.array2D[2][0], c2);

  const double s1=sin(x);
  const double c1=cos(x);
  z=atan2(s1*matrix.array2D[0][2]-c1*matrix.array2D[0][1], c1*matrix.array2D[1][1]-s1*matrix.array2D[1][2]);

  //allemaal neg nav de sign flips in de ROTSTEP spec.
  x=-rad2Deg(x);
  y=-rad2Deg(y);
  z=-rad2Deg(z);

  if (roundTo>0)
  {
    x=((int)round(x/roundTo))*roundTo;
    y=((int)round(y/roundTo))*roundTo;
    z=((int)round(z/roundTo))*roundTo;
  }
};
Reply
Re: LDCad 1.6 ROTSTEP feedback
I never used ROTSTEP, but about the question "Also does anyone know the best/easiest way to extract the angles from an existing rotation matrix?", attached you can find the Excel file I use to convert angles to matrix and vice versa (second sheet), plus some useful trigonometric formulas to estimate the angles to be applied to pieces (first sheet).

You can paste in B2 the rotation matrix copied from LDCad and see the results in the B13Big Grin15 range (choose the axis sequence you prefer), or obtain the resulting rotation matrix in B28, from the angles applied in the x-z-y order from the B19:B21 cells.

Note that the 2D arctangent in Excel uses the arguments in reversed order in respect to other programming languages and math bibliography.

I don't know if this is the easiest/best way to obtain them, I have no PhD in mathematics :-P
Ignore the round formula.

Hope this can help you

EDIT:
Oops, just saw you already found a solution.. I have not yet studied your formulas, but I have not seen a check condition for the +/-90 degrees singularity. Have you checked the rotation matrix 0 -1 0 1 0 0 0 0 1?
Reply
Re: LDCad 1.6 ROTSTEP feedback
TestOne Wrote:EDIT:
Oops, just saw you already found a solution.. I have not yet studied your formulas, but I have not seen a check condition for the +/-90 degrees singularity. Have you checked the rotation matrix 0 -1 0 1 0 0 0 0 1?
It gives x=0 y=0 z=90.

I applied this document in the extraction function.

I just needed to switch the matrix col/rows (due to OpenGL). And flipped the resulting angle signs to compensate for the minor differences in building the matrix in the first place as dictated by the ROTSTEP spec.

edit: used the wrong matrix to test, xyz values corrected.
Reply
Re: LDCad 1.6 suggestions/plans
I see instructions for starting Draw on a Mac but nothing on my computer will open Draw. What program do I need to open the file?
Reply
Re: LDCad 1.6 suggestions/plans
AKGrannymom Wrote:I see instructions for starting Draw on a Mac but nothing on my computer will open Draw. What program do I need to open the file?
Hi there,
For the Mac there is Bricksmith to open LDraw files.
See: http://bricksmith.sourceforge.net/
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 scripting preview clip
Hi all,

I've been working on the new scripting extensions now and then and would really like some feedback on the api / default tool/sample collection.

A short (~3 min) clip: https://youtu.be/xP-d-A6SmnE

The main script used in it does technic engine piston placement magic for the current model.

It also shows the new global animation feature.

Below is the source of the engine placement script, any thoughts suggestions are welcome.

edit: script as attachment as the bbcode messes with the [ i ] references.


Attached Files
.txt   script.txt (Size: 4.34 KB / Downloads: 3)
Reply
Re: LDCad 1.6 scripting preview clip
The video is awesome (of course!)
As for the script... I was able to follow most of what happens here, but it's difficult for me to tell more without a bit of experimentation...
Reply
Re: LDCad 1.6 ROTSTEP feedback
Lovely!
Macro's look cool and very handy.
The explode is very nice too!
Jaco van der Molen
lpub.binarybricks.nl
Reply
Re: LDCad 1.6 suggestions/plans
Looks super impressive to me. Also a huge time saver especially for all those angles and such required for the piston placements.

Seems like your only a baby step away from hitting a button and making those pistons animate within in the cylinders?
______________________________________________
OS = Ubuntu 14.04 LTS (64bit)
Reply
Re: LDCad 1.6 suggestions/plans
Jason Smith Wrote:Seems like your only a baby step away from hitting a button and making those pistons animate within in the cylinders?
Yes only thing needed would be to keep track of the piston positions while the axle is rotating, then you could apply the same orientation calculations etc.

Maybe I'll add a new example model using that Smile
Reply
Re: LDCad 1.6 scripting preview clip
While a global acting script works great here, I think it would be interesting to be able to restict scope to current selection. Access to selection order would be useful too, eg. to write a script that builds a technic chain around currently selected gears.
Reply
Re: LDCad 1.6 scripting preview clip
Philippe Hurbain Wrote:While a global acting script works great here, I think it would be interesting to be able to restict scope to current selection. Access to selection order would be useful too, eg. to write a script that builds a technic chain around currently selected gears.
This is possible using the new session:getSelection function, it basically returns a normal group (as internally the selection is technically just another group).
Reply
Re: LDCad 1.6 suggestions/plans
I just remembered a feature I'd like to see in LDCad. I believe I talked about this one earlier too: mirror building. Just like in SR3D Builder. Where you set up a mirror where you like, and then the software mirrors on side B what you're placing on side A.

Most parts can be mirrored without problems, but a bunch have a mirrored copy (wings etc.). I'm happy to help with such a list Smile
Reply
Re: LDCad 1.6 suggestions/plans
Merlijn Wissink Wrote:I just remembered a feature I'd like to see in LDCad. I believe I talked about this one earlier too: mirror building. Just like in SR3D Builder. Where you set up a mirror where you like, and then the software mirrors on side B what you're placing on side A.
I have been thinking about that but I'm probably going the cheap route and only offer a selection based axis flip. Problem is there might be different mirrored part versions for the different axis' but I might be overthinking that.

The basic flipping can even be done with the new macro scripting feature. But an list of mirrored parts would probably work better combined with a integrated feature.
Reply
Re: LDCad 1.6 suggestions/plans
Maybe this is already part of the setting and I couldn't find it. Please correct me if I'm wrong but the categories show the first part which corresponds alphabetically to the category. While Animal, Arch and Brick have a meaning you cannot tell at first sight that the 93609.dat leads to the Minifig category or why on earth the Duplo Plate 1x2 with Overhang should give an obvious clue for plates.

I wish there were a some sort of setting where by default some parts have been selected as representative for each category and where you also have the chance to change them or that the thumbnails also show the category's name.

w.
LEGO ergo sum
Reply
Re: LDCad 1.6 suggestions/plans
Willy Tschager Wrote:Maybe this is already part of the setting and I couldn't find it. Please correct me if I'm wrong but the categories show the first part which corresponds alphabetically to the category. While Animal, Arch and Brick have a meaning you cannot tell at first sight that the 93609.dat leads to the Minifig category or why on earth the Duplo Plate 1x2 with Overhang should give an obvious clue for plates.
Those are generated groups based upon their !CATEGORY meta using the first part in the list as their mascot. So you could wonder why is a duplo part in the plate category to begin with (as there is a duplo one).

These weird category quirks and the need for sub categories is the reason I added the sorted top level group. Those offer all the options you describe through the corresponding pbg files.

Willy Tschager Wrote:I wish there were a some sort of setting where by default some parts have been selected as representative for each category and where you also have the chance to change them or that the thumbnails also show the category's name.
Letting the user optionally change the group mascots would be a nice extra feature, I might add that in one of the alpha's. Thanks for the idea.
Reply
Re: LDCad 1.6 suggestions/plans
SR3D Builder's MirrorList.txt could be a nice starting point. I've attached it as example.


Attached Files
.txt   MirrorList.txt (Size: 11.79 KB / Downloads: 2)
Reply
Re: LDCad 1.6 suggestions/plans
I was hoping to solve this by adding a new meta you can use in the shadow library. Only problem I need to solve for that is how to handle inheritance so e.g. left/right wings can be handled in the shared subpart etc.
Reply
Re: LDCad 1.6 - unofficial parts handling
A while back someone asked to add some sort of an indication to show which parts are unofficial ones. I've added this by adding a small label in the bin cells.

The thing I'm wondering about... do people think this should be different for parts inside a mpd or maybe even different per unofficial source?

See below attached png for the current situation.


Attached Files Thumbnail(s)
   
Reply
Re: LDCad 1.6 - unofficial parts handling
I think what you have is fine.

However, you might consider instead having a yellow triangle with an exclamation mark in the middle, and when the user either clicks on that or hovers over it, have it show what it's warning about. For now, it could just say something like "Unofficial Part", but in the future you could add other warnings. Or, you could give more details in the warning, like you were asking about.
Reply
Re: LDCad 1.6 - unofficial parts handling
The "someone" was me. Looks good to me but I would add an additional visual warning by colouring the background of the parts in question. Say a lighter blue or a shade of red, ...

As for the MPD I do not have an opinion. To me it is sufficient that MPDCenter does its job for the OMR.

w.
LEGO ergo sum
Reply
Re: LDCad 1.6 - unofficial parts handling
How do LDCad choose between an Official Part and a recycled, updated Unofficial Part?
Reply
Re: LDCad 1.6 - unofficial parts handling
Magnus Forsberg Wrote:How do LDCad choose between an Official Part and a recycled, updated Unofficial Part?
This depends on the search order of your libraries and if a copy of it is present in the mpd.

The order is:

MPD content.
folder the mpd is located in.
Library paths as given in the 'prefs\ldraw\search (library) paths' dialog.
Reply
Re: LDCad 1.6 - unofficial parts handling
So, if I have an updated version of an (official) part in my unofficial folder, I have to place the unofficial path above the official one?

Or, If I put it like this: The updated version will not be used, or found, or be indicated by a UnOff flag, as long as the old version is present in the official part folder, if that is the first folder to be searched. Right?
Reply
Re: LDCad 1.6 - unofficial parts handling
Roland Melkert Wrote:The thing I'm wondering about... do people think this should be different for parts inside a mpd or maybe even different per unofficial source?
What about adding this as a configuration item of the ldraw path object: a color of background in a partbin (in addition to "Type", "Location" and "shadow"). Then, for example, there may be default values according to the Type but one can change it to whatever he/she wants.
Reply
Re: LDCad 1.6 - unofficial parts handling
Magnus Forsberg Wrote:So, if I have an updated version of an (official) part in my unofficial folder, I have to place the unofficial path above the official one?
Yes the label will only be rendered if the referenced part has the appropriate LDRAW_ORG/"0 UNOFFICIAL PART" meta settings or if no meta is present and it is located in an unofficial library location.

Which part is referenced is determined by the mentioned search order. So if you want the unofficial parts to be dominant all you have to do is make sure its location is listed above the official one(s).
Reply
Re: LDCad 1.6 - unofficial parts handling
Travis Cobbs Wrote:you might consider instead having a yellow triangle with an exclamation mark in the middle, and when the user either clicks on that or hovers over it
I like this idea, I wanted to add 'balloons' to the gui anyway in order to improve the hint system. At that time I could upgrade this feature too.


Willy Tschager Wrote:I would add an additional visual warning by colouring the background of the parts in question. Say a lighter blue or a shade of red, ...
I'm not sure about using different backgrounds, I did a test of that (usiing paint) and it seemed very ugly to me, maybe using different text/icon colors instead would be better. I already changed the yellow into light green if the unofficial part is embedded in the mpd.


Milan Vančura Wrote:What about adding this as a configuration item of the ldraw path object: a color of background in a partbin (in addition to "Type", "Location" and "shadow"). Then
I think Willy also suggested thins at some point. Like I wrote above I could do this for the text/icon colors.

Thanks for the feedback guys.
Reply
Re: LDCad 1.6 suggestions/plans
Feature request:

* Add the shortkey information to the status bar messages. Example, when hovering over the 2D/3D toggle in the compass:

Toggle between 2D (Orthographic) and 3D (Perspective) projection - [v]

or

Start a new model in a new file - [ctrl+n]

* Add a menu with the list of the shortkeys without the need to check them online
* A setting to get rid off the "Getting started" dialog or at least add a "Clear screen" to it where I do not get any further dialog.

w.
LEGO ergo sum
Reply
Re: LDCad 1.6 suggestions/plans
Adding to the list.

* I want to search any/all bins after a partnumber? Or is that only me, being a part author, knowing to many partnumbers?
* Would it be possible to rotate the part in the bins? I want to see the pattern/sticker sometimes placed on the backside of the part.
Reply
Re: LDCad 1.6 suggestions/plans
Willy Tschager Wrote:Add the shortkey information to the status bar messages. Example, when hovering over the 2D/3D
Great suggestion, I'll add this asap.

Willy Tschager Wrote:Add a menu with the list of the shortkeys without the need to check them online
The 1.6 version has a hotkey configuration dialog it also shows the current bindings. I was also planning to add an option to generate a html overview. Mostly so I can copy paste it in my own documentation website without having to double check everything each time I add something to the program Smile

Willy Tschager Wrote:A setting to get rid off the "Getting started" dialog or at least add a "Clear screen" to it where I do not get any further dialog.
I could add this but why would you want that? the dialog goes away as soon you open a (new) file no matter how you do that.

Magnus Forsberg Wrote:I want to search any/all bins after a partnumber? Or is that only me, being a part author, knowing to many partnumbers?
This is already possible but disabled by default, as searching the name meta would pollute searching on e.g. stud counts which most people do. You enable it by opening the advanced search dialog (click the filter text rectangle), over there check the 'name' item in the 'match on' panel. You probably also want to click the 'apply to all' and 'set as default' in the options menu (right bottom) afterwards.

Magnus Forsberg Wrote:Would it be possible to rotate the part in the bins? I want to see the pattern/sticker sometimes placed on the backside of the part.
This is also already possible, hold the ctrl key down while clicking a bin cell it then acts like the trackball rotation in the main editor.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 6 Guest(s)