LDCad 1.6a (win+linux)


LDCad 1.6a (win+linux)
#1
Ok, I've hadn't any bug reports for awhile so I'm releasing the 1.6a version.

It's mainly a maintenance version but as there won't be a 1.7 version it also includes a couple of minor new features, namely:

- Direct color selection by number. This is done by typing the number followed by enter while the mouse is over a color name inside any color bin. Or click that text to open a input dialog for typing the number/hex code.
- Transparent color indication inside the color bin history bar.

It also includes a couple of new templates and a handful of snapping corrections etc.


Linux note: It might be needed to delete the whole partBin location before starting the program to really fix some of the template group problems resulting from the (now fixed) dos folder seps inside dirList bin groups bug.

   

Hope it's worth the upgrade Smile
http://www.melkert.net/LDCad/download
Reply
RE: LDCad 1.6a (win+linux)
#2
(2017-10-01, 19:45)Roland Melkert Wrote: - Direct color selection by number.

Thanks, Roland. This is an interesting feature. I remember someone suggested searching by a color name, that would be even better. More for humans, you know Smile

BTW, this touches the problem I just had this week. It was, again, so difficult to find some colors among all those dithered ones that I decided to create my own filter for partBin. Thanks a lot for both making LDCad so configurable and for your technical documentation. Life is so easy and nice now! :Big Grin Three wheels instead of 10 for solid colors and all those strange colors gone!

It works so well for me that I'm probably too lazy to learn color numbers Smile
Reply
RE: LDCad 1.6a (win+linux)
#3
(2017-10-01, 19:45)Roland Melkert Wrote: Ok, I've hadn't any bug reports for awhile so I'm releasing the 1.6a version.

Hi Roland,

I just installed 1.6a (Windows 7, 32 bit) and when I opened LDCAD it displayed a dialog window titled "Scripting console" in which it displayed the following:


Quote:[string "samples.lua"]:244: "C:\Users\djm\AppData\Roaming\LDCad\scripts\default\global\samples.lua" execution exceeded the maximum duration of 250ms.

Script main run failed.

which is something which I suspect should not have occurred.

Regards,

David
Reply
RE: LDCad 1.6a (win+linux)
#4
Quote:BTW, this touches the problem I just had this week. It was, again, so difficult to find some colors among all those dithered ones that I decided to create my own filter for partBin.
There is a switch to disable dithered colors without messing with color bins:
Prefs->ldraw->calculate missing dithered
Prefs->ldraw->calculate missing transparent
Indeed, disabling them is mostly helpful!!!
Reply
RE: LDCad 1.6a (win+linux)
#5
(2017-10-02, 8:38)Philippe Hurbain Wrote: There is a switch to disable dithered colors without messing with color bins:
It's funny (after all that time with partBin definitions someone comes with a two-click solution and Murphy laughs) but very helpful. I do not need to transfer my partBin files to new LDCad versions, just click twice. Thanks, Philippe!
Reply
RE: LDCad 1.6a (win+linux)
#6
(2017-10-02, 9:07)Milan Vančura Wrote:
(2017-10-02, 8:38)Philippe Hurbain Wrote: There is a switch to disable dithered colors without messing with color bins:
It's funny (after all that time with partBin definitions someone comes with a two-click solution and Murphy laughs) but very helpful. I do not need to transfer my partBin files to new LDCad versions, just click twice. Thanks, Philippe!
You're welcome Wink
I personnaly think that dithered colors should default to disable...
Reply
RE: LDCad 1.6a (win+linux)
#7
(2017-10-02, 8:05)David Manley Wrote: I just installed 1.6a (Windows 7, 32 bit) and when I opened LDCAD it displayed a dialog window titled "Scripting console" in which it displayed the following:

Probably one of two things:

1: The script really takes too long to run, meaning your system is extremely slow (background work running?) as that script shouldn't take more then 1ms even on old systems.

2: The timing functions LDCad use are unreliable on your system, this should be visible by also having very low frame rate numbers in the lower left corner while the graphics are clearly not that slow.

Both issues can be fixed by deleting the scripts in "C:\Users\djm\AppData\Roaming\LDCad\scripts\default\global", none of those are essential for LDCad's basics. Or just ignore the message at startup.
Reply
RE: LDCad 1.6a (win+linux)
#8
(2017-10-02, 9:39)Philippe Hurbain Wrote: I personnaly think that dithered colors should default to disable...

You can also filter them out using the <filter> sections in a kind=filter cbg.


I initially enabled them because they seems widely used at the time.

Also when disabled models using them would still force them into the bin when needed (not kept when restarting). You can prevent that by using the filter.

Side-note: they aren't even really dithered but blended Big Grin
Reply
RE: LDCad 1.6a (win+linux)
#9
Roland,

did you change something in regard of the LDraw path? Despite the fact that I write the LDraw path in the AIOI via the main.cfg I've got a pop-up at the first launch. Could it be because of the zipped/unzipped version of the library? If so, just let me know what has to be done to point to the complete.zip in the LDraw root folder (as I did for LeoCAD).

w.
LEGO ergo sum
Reply
RE: LDCad 1.6a (win+linux)
#10
(2018-01-30, 19:48)Willy Tschager Wrote: Roland,

did you change something in regard of the LDraw path? Despite the fact that I write the LDraw path in the AIOI via the main.cfg I've got a pop-up at the first launch. Could it be because of the zipped/unzipped version of the library? If so, just let me know what has to be done to point to the complete.zip in the LDraw root folder (as I did for LeoCAD).

w.

I didn't change anything on that front in recent versions.

Maybe youi forgot the last backslash needed to indicate a directory, other wise it will try to open it as a zip.

So In main.cfg:
Code:
<LDrawPaths>
off->C:\Users\Public\Documents\LDraw\

or
Code:
<LDrawPaths>
off->C:\Users\Public\Documents\LDraw\complete.zip



You can also use LDCad.cfg (or e.g LDCad64.cfg if LDCad64.exe is used) so it works for all users (main.cfg is on a per user base).
by using:
Code:
[defaults]
defMainLib=C:\Users\Public\Documents\LDraw\

It will also accept a zip absfilename.

setup will also automatically look for complete.zip if no parts and p folders are present in the main library location at first start.
Reply
RE: LDCad 1.6a (win+linux)
#11
Hello Roland. I see new update of parts is released, what recalled me the question of snap data for the previous one. Please, do you have it ready and is it downloadable somewhere? Maybe I missed a link (if it was in the middle of some thread only). Thanks!
Reply
RE: LDCad 1.6a (win+linux)
#12
(2018-01-31, 11:08)Milan Vančura Wrote: Hello Roland. I see new update of parts is released, what recalled me the question of snap data for the previous one. Please, do you have it ready and is it downloadable somewhere? Maybe I missed a link (if it was in the middle of some thread only). Thanks!

I processed the 1701 library in preparation of 1.6b, I also made some changes to the bin which I posted here:
https://forums.ldraw.org/thread-22656.html

I will also make shadow files for the new 1801 lib before releasing 1.6b (will cause a slight delay in its release though).
Reply
RE: LDCad 1.6a (win+linux)
#13
(2018-01-31, 18:18)Roland Melkert Wrote: I processed the 1701 library in preparation of 1.6b, I also made some changes to the bin which I posted here:
https://forums.ldraw.org/thread-22656.html
Thanks, this is what I installed. I see some changes in part bin structure but snapping is still missing for new parts. For example 24299 (missing antistuds on bottom).
And I was surprised the zip file contains .sf files for seeds/ directory only, I expected an update of shadow/ directory as well - this is how I came up with (probably wrong) assumption the snap info is not a part of that .zip file and I need to get an extra update... ?
Reply
RE: LDCad 1.6a (win+linux)
#14
(2018-02-01, 13:03)Milan Vančura Wrote:
(2018-01-31, 18:18)Roland Melkert Wrote: I processed the 1701 library in preparation of 1.6b, I also made some changes to the bin which I posted here:
https://forums.ldraw.org/thread-22656.html
Thanks, this is what I installed. I see some changes in part bin structure but snapping is still missing for new parts. For example 24299 (missing antistuds on bottom).
And I was surprised the zip file contains .sf files for seeds/ directory only, I expected an update of shadow/ directory as well - this is how I came up with (probably wrong) assumption the snap info is not a part of that .zip file and I need to get an extra update... ?
That package contains shadow.sf which is the seed for snapping info.

Seed files are simply my solution to the multi user environment thing, they are renamed zip files with the default settings for partibin, colorbin, shaow etc. They will auto extract when the matching root folder (as set in LDCad.cfg or besides the main exe if no cfg is present) doesn't exist (first start for this user) or when the last extraction date is older then the .sf timestamp.
Reply
RE: LDCad 1.6a (win+linux)
#15
(2018-02-01, 20:32)Roland Melkert Wrote:
(2018-02-01, 13:03)Milan Vančura Wrote: Thanks, this is what I installed. I see some changes in part bin structure but snapping is still missing for new parts. For example 24299 (missing antistuds on bottom).
That package contains shadow.sf which is the seed for snapping info.
Yes. I can look into them on filesystem - like into any other zip file. And I see that shadow.cf contains 24299.dat file with the snap definition I'd expect (two antistuds at part bottom). But after I put all these .sf files into seeds/ subdirectory and start LdCAD, I see no antistuds there for part 24299. Checked with "show snap info" function (F12).
Is there any special action I need to do? Or LdCAD setting?

I expect that it starts to work when I extract .csl file from the .sf file manually and put it into shadow/ directory (replace the old/original version of the same file). But why it does not work with seeds/ directly?
Reply
RE: LDCad 1.6a (win+linux)
#16
(2018-02-01, 23:07)Milan Vančura Wrote:
(2018-02-01, 20:32)Roland Melkert Wrote: That package contains shadow.sf which is the seed for snapping info.
Yes. I can look into them on filesystem - like into any other zip file. And I see that shadow.cf contains 24299.dat file with the snap definition I'd expect (two antistuds at part bottom). But after I put all these .sf files into seeds/ subdirectory and start LdCAD, I see no antistuds there for part 24299. Checked with "show snap info" function (F12).
Is there any special action I need to do? Or LdCAD setting?

I expect that it starts to work when I extract .csl file from the .sf file manually and put it into shadow/ directory (replace the old/original version of the same file). But why it does not work with seeds/ directly?
The .sf only updates the .csl, but it seems you are using the shadow library unpacked. If so you'll need to manually unpack the updated csl again. It's probably better to first delete the old unpacked folder as I have deleted some files because those parts who have been moved/renamed in the new library (~moved in description)
Reply
RE: LDCad 1.6a (win+linux)
#17
Bug report:

If you have an invalid path set for the shadow library of the official library, LDCad crashes with no error upon navigating to parts bin where an official file thumbnail is generated.
Reply
RE: LDCad 1.6a (win+linux)
#18
(2018-02-11, 4:48)Orion Pobursky Wrote: Bug report:

If you have an invalid path set for the shadow library of the official library, LDCad crashes with no error upon navigating to parts bin where an official file thumbnail is generated.
What filename were you using? as I can't get it to crash by setting non existing shadow locations, also the log reported a "could not locate ...." in such cases.
I also tried setting a non zip as a csl but gives only gives a "invalid zip file" message dialog without.
Reply
RE: LDCad 1.6a (win+linux)
#19
(2018-02-11, 19:54)Roland Melkert Wrote:
(2018-02-11, 4:48)Orion Pobursky Wrote: Bug report:

If you have an invalid path set for the shadow library of the official library, LDCad crashes with no error upon navigating to parts bin where an official file thumbnail is generated.
What filename were you using? as I can't get it to crash by setting non existing shadow locations, also the log reported a "could not locate ...." in such cases.
I also tried setting a non zip as a csl but gives only gives a "invalid zip file" message dialog without.

Hmm. That’s what I changed to solve the crash but maybe that wasn’t the real cause. I’ll try to reproduce when I get home.
Reply
RE: LDCad 1.6a (win+linux)
#20
Small question: why is the rendering of part 24246 so weird in LDCad (see attached image)?
It's doing weird things with the shadows and it almost looks like the part is some kind of metallic, but it's just standard LBG like the other parts in the image.


Attached Files Thumbnail(s)
   
Reply
RE: LDCad 1.6a (win+linux)
#21
(2018-03-04, 16:38)Merlijn Wissink Wrote: Small question: why is the rendering of part 24246 so weird in LDCad (see attached image)?
It's doing weird things with the shadows and it almost looks like the part is some kind of metallic, but it's just standard LBG like the other parts in the image.

Because many triangles meet into a single point using large angles in relation to each other, the smoothing algorithm averages the normals of those triangles (unless an edge line is found) .

Something like this, where black are the base triangle/normals, red is the smoothed one and dark yellow the computed surface resulting from those normals

   

This is a shortcoming of the current smoothing algorithm, I'm looking to improve it in LDCad 2
Reply
RE: LDCad 1.6a (win+linux)
#22
I'm hooked on the subject here, not to create a new one.
When the mouse is on white I char in right bottom corner we seen statistic. Can add you approximate weight of model ? Use this file to detect weight of single part.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#23
(2018-03-10, 19:31)Jarema Wrote: I'm hooked on the subject here, not to create a new one.
When the mouse is on white I char in right bottom corner we seen statistic. Can add you approximate weight of model ? Use this file to detect weight of single part.

That could be a very cool feature for 2.0, thanks for pointing to that file.
Reply
RE: LDCad 1.6a (win+linux)
#24
Lightbulb 
Nice to have in 2.X Release: 

Shorten... | Longer...
Menu options with collision detection. Hold XYZ location and color of. N is available length of this kind of brick.
  • Selected Technic, Axle 2 change on Technic, Axle 3|4|5|.. only without exceptions
  • Selected Technic, Axle 3 with Stop change on Technic, Axle 4|5|.. with Stop only without exceptions
  • Selected Brick 1x4  can change on Brick 1xN only.
  • Selected Brick 2x4  can change on Brick 2xN only. 
  • et cetera
Replace with alternative...
Hold XYZ location, color of, length. Change only type - if it exists for desired length of selected part.
  • Technic, Axle =>Technic, Axle with Stop|Threaded
Make me
Sub-menu of context menu with list of available official colors for selected part or group of parts.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#25
Saving state
Can restore pin-up window | menu after LDCad run ? This is very frustrating, must open and dock again all menu i have to work freely.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#26
(2018-03-11, 8:09)Jarema Wrote: Nice to have in 2.X Release: 

Shorten... | Longer...
Menu options with collision detection. Hold XYZ location and color of. N is available length of this kind of brick.
  • Selected Technic, Axle 2 change on Technic, Axle 3|4|5|.. only without exceptions
  • Selected Technic, Axle 3 with Stop change on Technic, Axle 4|5|.. with Stop only without exceptions
  • Selected Brick 1x4  can change on Brick 1xN only.
  • Selected Brick 2x4  can change on Brick 2xN only. 
  • et cetera
Replace with alternative...
Hold XYZ location, color of, length. Change only type - if it exists for desired length of selected part.
  • Technic, Axle =>Technic, Axle with Stop|Threaded
Make me
Sub-menu of context menu with list of available official colors for selected part or group of parts.
These things all need extra information, which could be included in the shadow I guess. But the main problem with that is the amount of work involved in finding/defining that information. It took me years to get snapping at the point it is.

That said collision is something I'm considering for 2.0, but its low priority. The main improvements I want are tracking occupied connections and multi connection matching.

(2018-03-11, 11:54)Jarema Wrote: Saving state
Can restore pin-up window | menu after LDCad run ? This is very frustrating, must open and dock again all menu i have to work freely.
2.0 will have (virtual) 'desktops', menu state and position will be part of that and will be saved/restored.
Reply
RE: LDCad 1.6a (win+linux)
#27
Unpack
Move parts from sub-model to main-model. Then delete empty sub-model.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#28
PHP Code:
<?php 
--Local functions
local
function get_index (tab, val)
for
index, value in ipairs(tab) do
if
value == val then
return index
end
end

return nil
end

PHP Code:
<?php 
--Database
axle_normal_desc
= {
      'Technic, Axle 2','Technic, Axle 3'
     ,'Technic, Axle 4','Technic, Axle 5'
     ,'Technic, Axle 6','Technic, Axle 7'
     ,'Technic, Axle 8','Technic, Axle 9'
     ,'Technic, Axle 10','Technic, Axle 11'
     ,'Technic, Axle 12','Technic, Axle 16'
     ,'Technic, Axle 32'
}
axle_normal_num = {'3704.dat','4519.dat','3705.dat','32073.dat','3706.dat','44294.dat'
                    ,'3707.dat','60485.dat','3737.dat','23948.dat','3708.dat','50451.dat','50450.dat'}


function
runReplaceAxleHelper()
  --Some dummy proof tests.
  local ses=ldc.session()
  if not ses:isLinked() then
    ldc
.dialog.runMessage('No active model.')
    return
  end
 
--Selected session
  local sel
=ses:getSelection()
  local cnt=sel:getRefCount()
  if cnt>0 then
     
--use the first item as base
      local curPart
= sel:getRef(1)
      local curIdent= get_index(axle_normal_num ,curPart:getName())
      local curOri= curPart:getOri()
curOri:setPos(curPart:getPos())
      --Some dummy proof tests.
      if curIdent == nil then
       ldc
.dialog.runMessage('The wrong item was chosen')
       return
      end
     
--Let the user pick the new axle.
      local part=ldc.dialog.runChoice('Select a new axle', axle_normal_desc, curIdent)
      if axle_normal_num[part] == nil then
     
else
        sel:getRef(1):delete()
        sel:remove()
        sel:add(ldc.subfile():addNewRef(axle_normal_num[part], 4, curOri))
      end
  end
end

This is example code for functionality i propose to be part of incoming release.
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#29
(2018-03-12, 7:07)Jarema Wrote: Unpack
Move parts from sub-model to main-model. Then delete empty sub-model.

You can do that with the inline function, followed by session delete. Or do you mean from script?
Reply
RE: LDCad 1.6a (win+linux)
#30
How add item to "Favorite Parts" by hand and how add via LUA script ?
Lego isn't just a brand of plastic bricks. It's a lifestyle; and artistic medium.
Reply
RE: LDCad 1.6a (win+linux)
#31
(2018-03-13, 7:24)Jarema Wrote: How add item to "Favorite Parts" by hand and how add via LUA script ?

"F" while the mouse cursor is inside a part bin will add the current work part (the one with the green rectangle in its cell) to your favorites.

From script you can call the user action associated with that F hot key but there is currently no way of setting the working part from script.

I do hope these kinds of deeper integration scripts will be better facilitated in the 2.0 as I'm thinking about making that highly script based, having only the core rendering and window handling written in C++. I'm not certain about this though as the core is far from finished it self.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 8 Guest(s)