| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 5,698
» Latest member: Nicolas19
» Forum threads: 6,418
» Forum posts: 53,212
Full Statistics
|
| Online Users |
There are currently 174 online users. » 2 Member(s) | 168 Guest(s) Applebot, Baidu, Bing, Google, Nicolas19, Philippe Hurbain
|
| Latest Threads |
v 1.7 beta 2a snapping fe...
Forum: LDraw Editors and Viewers
Last Post: Nicolas19
2 hours ago
» Replies: 0
» Views: 26
|
98295c01pb02
Forum: Part Requests
Last Post: Peter Grass
7 hours ago
» Replies: 4
» Views: 3,329
|
2026 - New Parts -> Raw M...
Forum: Part Requests
Last Post: Gerald Lasser
9 hours ago
» Replies: 8
» Views: 262
|
Smort brick stuff
Forum: Part Requests
Last Post: Jeff Jones
Yesterday, 15:35
» Replies: 2
» Views: 224
|
Technic 1993
Forum: Official Models
Last Post: Takeshi Takahashi
Yesterday, 14:43
» Replies: 5
» Views: 7,554
|
Part request for 4518c an...
Forum: Part Requests
Last Post: Alfred Schmitz
Yesterday, 12:44
» Replies: 2
» Views: 196
|
2026 - New Parts -> Raw M...
Forum: Part Requests
Last Post: Gerald Lasser
2026-03-01, 20:43
» Replies: 3
» Views: 1,653
|
4175 part depth appears t...
Forum: Parts Authoring
Last Post: Evert-Jan Boer
2026-03-01, 13:28
» Replies: 1
» Views: 134
|
Discussion - proposal to ...
Forum: Official File Specifications/Standards
Last Post: N. W. Perry
2026-03-01, 4:50
» Replies: 60
» Views: 7,111
|
Animal minifigure heads l...
Forum: Part Requests
Last Post: Timothy Hall
2026-03-01, 3:41
» Replies: 20
» Views: 17,271
|
|
|
| Colors are gone (in MLCad) |
|
Posted by: Kuperus - 2023-11-07, 10:45 - Forum: Help
- Replies (7)
|
 |
Hi everyone,
Since I updated to the latest version all the colorschemes are gone. I can't for example not lionger choose Dark Blue as a color. Does anyone know how to fix that?
Kind regards,
Tymen
|
|
|
| November release |
|
Posted by: Orion Pobursky - 2023-11-05, 19:48 - Forum: Parts Tracker Discussion
- Replies (5)
|
 |
In two weeks, I'm planning on doing a November release. Partly to test the waters for monthly releases and partly because I found a bug in the license line code and want to make sure all official part licenses are properly annotated. The more parts ready for admin, the better.
|
|
|
| Need help for faster processing |
|
Posted by: Max Murtazin - 2023-11-02, 21:12 - Forum: LDraw File Processing and Conversion
- Replies (7)
|
 |
For a while, I've been writing a custom LDraw to Collada converter for Bricklink Studio, as the one currently in the program is, to put it lightly, sucks
Have a problem with it's performance of finding and merging same vertex positions
Here's the code for one I have currently:
Code: static void MergeCell1(List<Vector3> cell)
{
for (int i = 0; i < cell.Count - 1; i++)
{
for (int j = i + 1; j < cell.Count; j++)
if (Vector3.Distance(cell[i], cell[j]) < MERGE_RADIUS)
cell[j] = cell[i];
}
}
static void MergeCell2(List<Vector3> cell, List<Vector3> sharpCell)
{
for (int i = 0; i < cell.Count; i++)
{
for (int j = 0; j < sharpCell.Count; j++)
if (Vector3.Distance(cell[i], sharpCell[j]) < MERGE_RADIUS)
sharpCell[j] = cell[i];
}
}
static void MergeCell3(List<Vector3> sharpCell)
{
for (int i = 0; i < sharpCell.Count - 1; i++)
{
for (int j = i + 1; j < sharpCell.Count; j++)
if (Vector3.Distance(sharpCell[i], sharpCell[j]) < MERGE_RADIUS)
sharpCell[j] = sharpCell[i];
}
}
static void MergeCell4(List<Vector3> cell, List<Vector3> sharpCell)
{
for (int i = 0; i < sharpCell.Count; i++)
{
for (int j = 0; j < cell.Count; j++)
if (Vector3.Distance(sharpCell[i], cell[j]) < MERGE_RADIUS)
cell[j] = sharpCell[i];
}
}
static void MergePoints(string model)
{
if (preBuilt.ContainsKey(model)) return;
float maxX = subMeshes[model].MaxBy(x => x.X).X;
float maxY = subMeshes[model].MaxBy(x => x.Y).Y;
float maxZ = subMeshes[model].MaxBy(x => x.Z).Z;
float minX = subMeshes[model].MinBy(x => x.X).X;
float minY = subMeshes[model].MinBy(x => x.Y).Y;
float minZ = subMeshes[model].MinBy(x => x.Z).Z;
int step = (int)Math.Round(Math.Pow(subMeshes.Count, 1.0 / 3.0));
float stepX = (maxX - minX) / step;
float stepY = (maxY - minY) / step;
float stepZ = (maxZ - minZ) / step;
List<Vector3>[,,] cells = new List<Vector3>[step, step, step];
List<Vector3>[,,] cellsLines = new List<Vector3>[step, step, step];
for (int i = 0; i < step; i++)
for (int j = 0; j < step; j++)
for (int k = 0; k < step; k++)
{
cells[i, j, k] = (from a in subMeshes[model]
where
a.X <= minX + (i * stepX) && a.X > minX + (i + 1 * stepX) &&
a.Y <= minY + (i * stepY) && a.X > minY + (i + 1 * stepY) &&
a.Z <= minZ + (i * stepZ) && a.X > minZ + (i + 1 * stepZ)
select a).ToList();
}
for (int i = 0; i < step; i++)
for (int j = 0; j < step; j++)
for (int k = 0; k < step; k++)
{
cellsLines[i, j, k] = (from a in subSharps[model]
where
a.X <= minX + (i * stepX) && a.X > minX + (i + 1 * stepX) &&
a.Y <= minY + (i * stepY) && a.X > minY + (i + 1 * stepY) &&
a.Z <= minZ + (i * stepZ) && a.X > minZ + (i + 1 * stepZ)
select a).ToList();
}
Console.WriteLine("Merging points of model " + model + ", step 1 - " + subMeshes[model].Count + " points");
Parallel.ForEach(cells.Cast<List<Vector3>>(), MergeCell1);
Console.WriteLine("Merging points of model " + model + ", step 2 - " + subMeshes[model].Count + " points");
Parallel.ForEach(cells.Cast<List<Vector3>>(), x => Parallel.ForEach(cellsLines.Cast<List<Vector3>>(), y => MergeCell2(x, y)));
Console.WriteLine("Merging points of model " + model + ", step 3 - " + subSharps[model].Count + " points");
Parallel.ForEach(cellsLines.Cast<List<Vector3>>(), MergeCell3);
Console.WriteLine("Merging points of model " + model + ", step 4 - " + subSharps[model].Count + " points");
Parallel.ForEach(cells.Cast<List<Vector3>>(), x => Parallel.ForEach(cellsLines.Cast<List<Vector3>>(), y => MergeCell4(x, y)));
/*for (int i = 0; i < subMeshes[model].Count - 1; i++)
{
for (int j = i + 1; j < subMeshes[model].Count; j++)
if (Vector3.Distance(subMeshes[model][i], subMeshes[model][j]) < MERGE_RADIUS)
subMeshes[model][j] = subMeshes[model][i];
//if (i % (subMeshes[model].Count / 100) == 0 && i != 0) Console.WriteLine("Merging points of model " + model + ", step 1: " + i / (subMeshes[model].Count / 100) + " % ");
}
Console.WriteLine("Merging points of model " + model + ", step 2 - " + subMeshes[model].Count + " points");
for (int i = 0; i < subMeshes[model].Count; i++)
{
for (int j = 0; j < subSharps[model].Count; j++)
if (Vector3.Distance(subMeshes[model][i], subSharps[model][j]) < MERGE_RADIUS)
subSharps[model][j] = subMeshes[model][i];
//if (i % (subMeshes[model].Count / 100) == 0 && i != 0) Console.WriteLine("Merging points of model " + model + ", step 2: " + i / (subMeshes[model].Count / 100) + " % ");
}
Console.WriteLine("Merging points of model " + model + ", step 3 - " + subSharps[model].Count + " points");
for (int i = 0; i < subSharps[model].Count - 1; i++)
{
for (int j = i + 1; j < subSharps[model].Count; j++)
if (Vector3.Distance(subSharps[model][i], subSharps[model][j]) < MERGE_RADIUS)
subSharps[model][j] = subSharps[model][i];
//if (i % (subSharps[model].Count / 100) == 0 && i != 0) Console.WriteLine("Merging points of model " + model + ", step 3: " + i / (subMeshes[model].Count / 100) + " % ");
}
Console.WriteLine("Merging points of model " + model + ", step 4 - " + subSharps[model].Count + " points");
for (int i = 0; i < subSharps[model].Count; i++)
{
for (int j = 0; j < subMeshes[model].Count; j++)
if (Vector3.Distance(subSharps[model][i], subMeshes[model][j]) < MERGE_RADIUS)
subMeshes[model][j] = subSharps[model][i];
//if (i % (subSharps[model].Count / 100) == 0 && i != 0) Console.WriteLine("Merging points of model " + model + ", step 4: " + i / (subMeshes[model].Count / 100) + " % ");
}*/
}
In short, it subdivides space in sections, in each of which it checks each pair of vertices on if they are close enough to be considered the same, or not. Wonder if there is a way to make it faster
|
|
|
| [LDPE] 1.8.73 Released (align/distribute,snap to grid, remove params, vertex pasting) |
|
Posted by: Nils Schmidt - 2023-11-01, 18:12 - Forum: Parts Author Tools
- Replies (5)
|
 |
Hey,
Willy asked kindly for a feature to align and distribute objects. It is now available (Actions... => Align and Distribute...) on standard perspectives (front, back, left, right, top, bottom). I also added Max's wish to remove superfluous parameters from line types 1-5 (with a quick fix).
And Magnus' wish to not select all, but just one place of a pasted vertex.
There is also Philo's request to snap vertices to the grid (Actions... => Snap To Grid), only usable on standard perspectives (front, back, left, right, top, bottom) and I added a hint what the grid size value actually means (it is the grid size for 1-10% zoom). Finally, I added some improvements and fixed a small negligible bug.
![[Image: attachment.php?aid=12753]](https://forums.ldraw.org/attachment.php?aid=12753)
As always, you can download LDPE from this page:
http://nilsschmidt1337.github.io/ldparteditor/
Changelog:
(5 new features and 1 bug fix)
With this release you will be able to...
- ...align and distribute objects (isolated vertices, lines, triangles, quads and subfiles). It behaves differently if "Move Adjacent Data" is ON or OFF. ON keeps the objects connected together. OFF will seperate them. Only usable on standard perspectives (front, back, left, right, top, bottom) .
- ...snap vertices and subfiles to the current grid (only available on standard perspectives (front, back, left, right, top, bottom)).
- ...auto-remove superfluous arguments from text lines (type 1,2,3,4,5) and also add missing ones (via quick fix in the text editor).
- ...benefit from the fact that pasting a single vertex will not enable "Single Vertex Modification" if "Automatically disable "Move Adjacent Data" on paste (3D Editor)" is checked.
- ...benefit from a slightly faster 3D editor (e.g. lower latency when you add a triangle).
The following critical issue is fixed:
- Wrong "Invalid number format" warning on "!LPE DISTANCE".
The program was tested intensively with "real world" files.
However, something can go wrong in about 140.000 lines of code.
Installation on Windows:
- Download and extract LDPartEditor_win32_x64.zip
- Run LDPartEditor-1.8.73.msi
- Start LDPartEditor from the start menu
Installation on Linux:
- Download and extract LDPartEditor_linux_x64.zip
- Install ldparteditor_1.8.73-1_amd64.deb
- Start LDPartEditor from the menu or via launcher
Installation on Mac OS X:
- Download and extract LDPartEditor_mac_x64.zip
- Mount LDPartEditor-1.8.73.dmg
- Drag LDPartEditor.app to the Applications folder
- Copy ldparteditor.sh to your home folder
4a. Open a Terminal.app and run ./ldparteditor.sh
4b. Or open a Terminal.app and run /Applications/LDPartEditor.app/Contents/MacOS/LDPartEditor
I listen carefully to your requests and possible complaints. Please leave me a message, with your thoughts and wishes to further improve the software.
LDPE is a 3D CAD application: The overall system requirements are higher. While I recommend to use a powerful 64-bit multicore system, it could be possible, to run LDPE on older machines as well.
System Requirements:
Minimum System Requirements:
- OpenGL 2.1 compatible Graphics Card
- Operating System (64-bit): Windows [7 or newer], Linux [e.g. Ubuntu Linux >=14.4], Mac OS X [>=10.6]
- CPU: Multicore-Processor e.g. Intel Core 2 Duo or AMD Athlon II (>2.0Ghz)
- RAM: 4GB
- Video-Memory: 1 GB
- Free Disk Space: 150 MB
Recommended Requirements:
- Operating System (64bit): Windows 7,8,10,11, Linux [e.g. Ubuntu Linux >=14.4], Mac OS X [>=10.6]
- OpenGL 3.3 compatible Graphics Card
- CPU: Multicore-Processor with 4 cores (or more)
- RAM: >4 GB
- Video-Memory: >1 GB
- Free Disk Space: 500 MB
- For a faster start, LDPartEditor and the LDraw™ library should be installed on an SSD.
|
|
|
|