This is a continuation of this thread. The thread pointed out rounding errors in existing primitives. I have briefly discussed the issue with Chris, and what has to be done in order to fix the issue. He proposed that not only are fixed parts submitted, but also all official parts which have to be updated due to the changes.
Primitives are used very often in the LDraw library, so each change to a primitive will be associated with a large amount of affected files.
I encourage separate posts in this thread for each fixed primitive. Each post should contain:
- What the fix of the primitive is.
- An overview of all parts that use the primitive.
- Proposed fix of all parts that use the primitive and are affected.
This is my workflow. If you want to contribute to this, then I recommend using it as a starting point (and please find ways to optimize it, since this is taking a lot of time)
1) Use a primitive generator and tester like this to find a primitive with rounding errors.
2) Manually verify and document the error.
3) Fix the file (and the 8/ and 48/ version as well if affected)
4) Find files that use the primitive (I use "grep -ir primitive.dat ." since I use Linux tools, such as cygwin)
5) Go through each file and check all the points from lines of type 2, 3, 4 and 5. If any point lies next to a fixed point, then that point has to be updated. I have made a tool to find these points. If you are interested, I can share the tool with you. Right now it is a bit too technical to be released.
Hello, I am brand new here, and only 3 weeks involved in the Lego scene. After building a Lego Crocodile for my grandson, I studied a little bit on possibilities to motorize it. So I found Bricklink Studio, and designed already some train models. And as many other enthousiast I missed some essential parts, as thin rods for instance. Well I know you can buy them at Non Lego suppliers, but I want them also use them as digital parts in Bricklink Studio.
As experienced CAD designer I can make my own parts, and even print them on 3D FDM or Resin printers. I usually use Onshape, a very good and fully free online CAD program for hobbyists. See: https://www.onshape.com/en/products/free
So this week my question was, can I converse my part designs from Onshape to a digital part in Bricklink Studio. And I found Ldraw and stl2dat. In Onshape you can export parts to .STL in txt or binary format. As unit you can choose for mm. My question is, is that correct for a proper conversion?
Please, do you have any ideas how to solve this task?:
I have several MPD models, complex ones (nested submodels, buffer exchange used many times, hoses and strings etc. All this already interlocked with tons of LPUB3D commands) and now I need to create new mpd with all these models together (i.e. train containing machine and wagons). I do not need to keep original STEPs in original models (wagons), I create few new steps in the result model, showing how to connect wagons.
What's the easiest way to do this, preferably in LDCAD?
So far, I tried:
not working: nested mode, select all, copy&paste into new mpd. Strings were not copied, only one instance of each submodel was copied etc.
working but hard to do: select all, reorganize->inline several times, until it does something. Manually remove everything between buffer exchange blocks (error prone). Copy&paste into new mpd.
working but not sure it is correct solution: for each original mpd I do "File"->"Clean up"->"Add prefix", "embed unofficial". Then, create new empty mpd (with model "main"), join this new file and original mpd files into new one (on commandline, out of LDCAD: "cat new.mpd orig1.mpd orig2.mpd orig3.mpd >m.mpd && mv m.mpd new.mpd"). Open the result mpd in LDCAD again and use "MPD submodels" section in partbin.
While reviewing I came across some parts with Type 1 and Type 2 as description qualifier.
As we can surely describe the differences it's for sure sometimes hard for the (normal) user to know, which type he has to use. (Example 1/2 Technic Bushes, which are available in 4 different types. A normal user can surely find out, that the smooth version was introduced 1998, but the other types are hard to figure out.)
Therefore I would like to suggest introducing a new meta command !YEAR <xxxx> (optional < - yyyy>), where xxxx is the year the part is introduced and yyyy is the year the part is discontinued.
This command could be used by editors as an additional filter to get the right parts for modelling.
So after installing, every part was missing. Not super surprising so I just went to LDraw and downloaded the complete zip library. In LDCad, i changed the search path in preferences to the path of the folder the zip was in and set it as an official library. (wouldnt let me set a direct path to the zip, just its parent folder)
Nothing happened. I restarted the application but still all parts were missing. Am I missing something here? Is it not supposed to be a zip? I even went as far as downloading an unofficial library too and setting that up just in case it needed both for some reason? but still nothing.
Anyone know anything about this?
Edit: I used "search archive" instead of "search folder" so i was able to select the zip for the path. But the parts still do not show up in the icons or in the worspace (just red dots) even though they no longer say they are missing
Edit 2: apparently I did need to have an unofficial library and have it setup the same way i did in my first edit for the parts to appear. Ill leave this up for anyone who may have the same problem.
I haven't posted one of these for a little while (because I've learned so much already from previous ones), but here's my latest Technic math puzzle, from the 8880 Supercar:
Consider the suspension assembly pictured. The blue control arm rotates around A, and the length of AB is 60. The gray liftarm rotates around C, and of course CD is also 60 (as is AC, for that matter). The radius around D is 9.
The shock absorber is connected at B and E. Also at B, there is a gray stopper piece, and this is locked together with the shock absorber to the axle at B.
The purpose of the stopper is to wedge the liftarm between it and the control arm. When this happens, point D would be 19 LDU (its radius of 9 plus half the width of the adjacent parts) along both the Y-axis of the control arm and the Z-axis of the stopper. This means that the control arm can't be raised any more, so there must be a minimum possible value for the angle at A. That's what I want to find.
Right now I don't have enough values to solve the problem, because there are multiple possible solutions where D is 19 from both vectors. But eventually the length of the liftarm stops the assembly from closing any further, and I haven't worked out how to express this mathematically. I've got it "close enough" for now, with an approximate angle at A of 100.5°. But as always, I'm keen to know the precise answer, and the method to obtain it!
Greetings all.
Can't start LDPartEditor...
Here's the error log:
Code:
[LDPartEditor RELEASE ] Started on Tue Oct 05 12:58:34 EDT 2021
Unhandled event loop exception during blocked modal context.
java.lang.IllegalStateException: This function is not available.
at org.lwjgl.system.Checks.checkFunctionAddress(Checks.java:89)
at org.lwjgl.opengl.GL20.glUseProgram(GL20.java:477)
at org.nschmidt.ldparteditor.opengl.OpenGLRendererPrimitives20.drawScene(OpenGLRendererPrimitives20.java:93)
at org.nschmidt.ldparteditor.composite.primitive.CompositePrimitive$2.run(CompositePrimitive.java:360)
at org.eclipse.swt.widgets.Display.runTimer(Display.java:4090)
at org.eclipse.swt.widgets.Display.messageProc(Display.java:3207)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3585)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:166)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:368)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:469)
at org.nschmidt.ldparteditor.composite.primitive.CompositePrimitive.loadPrimitives(CompositePrimitive.java:576)
at org.nschmidt.ldparteditor.shell.editor3d.Editor3DDesign.createContents(Editor3DDesign.java:1423)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.nschmidt.ldparteditor.shell.editor3d.Editor3DWindow.run(Editor3DWindow.java:275)
at org.nschmidt.ldparteditor.splash.SplashScreen.run(SplashScreen.java:412)
at org.nschmidt.ldparteditor.main.LDPartEditor.main(LDPartEditor.java:48)
Exception in thread "main" java.lang.IllegalStateException: This function is not available.
at org.lwjgl.system.Checks.checkFunctionAddress(Checks.java:89)
at org.lwjgl.opengl.GL20.glCreateShader(GL20.java:260)
at org.nschmidt.ldparteditor.opengl.OpenGLRenderer20.loadGlossVertexShader(OpenGLRenderer20.java:2118)
at org.nschmidt.ldparteditor.opengl.OpenGLRenderer20.init(OpenGLRenderer20.java:209)
at org.nschmidt.ldparteditor.composite.Composite3D.<init>(Composite3D.java:1271)
at org.nschmidt.ldparteditor.composite.CompositeContainer.<init>(CompositeContainer.java:40)
at org.nschmidt.ldparteditor.shell.editor3d.Editor3DDesign.createContents(Editor3DDesign.java:1473)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.nschmidt.ldparteditor.shell.editor3d.Editor3DWindow.run(Editor3DWindow.java:275)
at org.nschmidt.ldparteditor.splash.SplashScreen.run(SplashScreen.java:412)
at org.nschmidt.ldparteditor.main.LDPartEditor.main(LDPartEditor.java:48)
As you can see in the log, the splash screen has time to show up a few seconds before the program crashes.
I'm running a Windows 10 Pro 64 bit machine with no GPU and an Intel i2 CPU.