Sort parts by position?


Sort parts by position?
#1
Is there a tool that can sort or group parts based on their position coordinates? Thanks.
Reply
RE: Sort parts by position?
#2
(2020-02-03, 0:09)Michael Horvath Wrote: Is there a tool that can sort or group parts based on their position coordinates? Thanks.
Not sure what you're trying to achieve, but the simple-minded answer is Excel (or any other spreadsheet program). Open the .ldr file as text, delimited by spaces, and you can do just about anything you like with it. It's all in fixed columns.
Reply
RE: Sort parts by position?
#3
(2020-02-03, 8:31)Martin James Wrote: Not sure what you're trying to achieve, but the simple-minded answer is Excel (or any other spreadsheet program). Open the .ldr file as text, delimited by spaces, and you can do just about anything you like with it. It's all in fixed columns.

That's a good suggestion. But is it possible for spaces to exist in an LDR file that aren't delimiters? Inline POV statements could mess things up too.
Reply
RE: Sort parts by position?
#4
(2020-02-03, 0:09)Michael Horvath Wrote: Is there a tool that can sort or group parts based on their position coordinates? Thanks.

I forgot that I implemented this ability into LDraw Design Pad (LDDP). Select the block of text you want to sort and choose Tools->Sort
Reply
RE: Sort parts by position?
#5
(2020-02-04, 3:04)Orion Pobursky Wrote: I forgot that I implemented this ability into LDraw Design Pad (LDDP). Select the block of text you want to sort and choose Tools->Sort

Note that if there are bugs or implementation limitations with this feature, I can't fix them since I no longer have the ability to compile the source code (for now).
Reply
RE: Sort parts by position?
#6
I haven't used LDDP in a long while. Can I sort just by three columns of text (X, Y and Z position) and ignore the others?
Reply
RE: Sort parts by position?
#7
(2020-02-03, 23:36)Michael Horvath Wrote: That's a good suggestion. But is it possible for spaces to exist in an LDR file that aren't delimiters? Inline POV statements could mess things up too.
Yes, there can be spaces in other places, but you can first filter out all the rows that have "0" as the first colum, leaving just the part definitions.
Reply
RE: Sort parts by position?
#8
(2020-02-04, 7:24)Michael Horvath Wrote: I haven't used LDDP in a long while. Can I sort just by three columns of text (X, Y and Z position) and ignore the others?

You can sort on center, max, or min x/y/z, color, linetype, and subfile.
Reply
RE: Sort parts by position?
#9
(2020-02-04, 23:51)Orion Pobursky Wrote: You can sort on center, max, or min x/y/z, color, linetype, and subfile.

Thank you.
Reply
RE: Sort parts by position?
#10
(2020-02-03, 0:09)Michael Horvath Wrote: Is there a tool that can sort or group parts based on their position coordinates? Thanks.

Both MLCad and LDCad can sort by height, can they not?
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: Sort parts by position?
#11
I ended up writing a small script that splits a model into several models depending on the x and z coordinates. It is in the Datsville GitHub repo. I'm not sure if I should parse for multiple kinds of white space between coordinate values or just regular spaces however. So the script may fail, depending.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 7 Guest(s)