LDraw.org Discussion Forums

Full Version: [LDPartEditor] 0.8.18 Beta Released
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2016-07-19, 8:46)Willy Tschager Wrote: [ -> ]Feature request of the day:

* As a user I'd like to have a wrapper window, which would full-screen either the Text or the 3D pane with a click in the right top-hand corner or split the two panes with a divider I can move with the mouse:



this would IMHO make the handling of the two editors much easier and the continuous taskbar-clicking superfluous.

w.

I created a ticket.

However, your request is really hard to implement. SWT does not support MDI and there exists a ton of business logic for the two editor windows due to the fact that the 3D and the text editor are simply seperate windows.

They are synchronised (which was very complicated to implement!) and access each other in different ways.
It is also possible to use more than one text editor and to drag and drop the tabs to another text editor instance.
I highly doubt that I am able to refactor the whole application for just a two or ten less clicks on the taskbar.

To seperate the text from the 3D editor was the first design choice for LDPE I made about five years ago...
Nevertheless... I will find a way.
You can now (with the upcoming milestone 0.8.19)
use tabs to select, open and close a recently used file from the current session.
The two yellow arrows enable the synchronisation between the tab selection in the 3D and text editor.
If you select a tab in the 3D editor, it gets selected in the text editor and vice versa.

[Image: Tabs3DEditor2.PNG]
Apart for leaning purpose I really don't think it's a good idea to really cut the sphere. Interpenetrating cyli/sphe primitives will give a much better visual result and simpler code. There is an existing cyli to sphe primitive too (not on my computer, can't find it)
(2016-07-19, 9:32)Willy Tschager Wrote: [ -> ]I'm fixing:

30082.dat

I tried to use CSG to rebuild to cut sphere. Here is what I came up with, based on your tutorial on the wiki:


Code:
0 BFC CERTIFY CCW

0 // Set the quality and epsilon value (optional)
0 // SYNTAX 0 !LPE CSG_QUALITY [3 to 48]
0 !LPE CSG_QUALITY 16
0 // SYNTAX 0 !LPE CSG_EPSILON [>=.0001]
0 !LPE CSG_EPSILON .0001

0 // Define the shapes
0 // SYNTAX 0 !LPE [CSG SHAPE] [ID (can be any string without spaces)] [COLOUR] [MATRIX]
0 !LPE CSG_ELLIPSOID a 1  0 0 10 7 0 0 0 0 7 0 -7 0
0 !LPE CSG_CUBOID    b 4  0 0 0 10 0 0 0 10 0 0 0 10

0 !LPE CSG_CYLINDER z 14 0 -7 13.5 2.5 0 0 0 14 0 0 0 2.5
0 !LPE CSG_CUBOID y 4  0 -4.5 16.5 2.5 0 0 0 2.5 0 0 0 3
0 !LPE CSG_CUBOID x 4  0 4.5 16.5 2.5 0 0 0 2.5 0 0 0 3

0 // Modify the shapes
0 // SYNTAX 0 !LPE [CSG FUNCTION] [origin ID] [origin ID2] [target ID3]
0 !LPE CSG_DIFFERENCE a b f
0 !LPE CSG_UNION x y w
0 !LPE CSG_UNION w z v
0 !LPE CSG_DIFFERENCE f v u

0 // Compile the output
0 // SYNTAX 0 !LPE CSG_COMPILE [ID]
0 // The COMPILE command displays the CSG volume on the screen
0 // Inlining the following line will generate triangles of the CSG volume
0 !LPE CSG_COMPILE u


I also inlined the compiled U but was not very happy with the output, so I guess there is room for improvement of my code. Any help and suggestion is welcomed.


Well, the CSG code is fine... To clean the output, I normally exploit part symmetries to save some work and finally use the MeshReduce tool and do some manual tweaking.
It is extremly difficult to "automagically" optimise these CSG meshes very fast (without destroying them).
I appreciate any technical advice how I can improve the output quality.
Maybe someone nows a better CSG algorithm?

Here are my authoring results (no primitive substitution):

Code:
0 BFC CERTIFY CCW

4 1 4.57297 1.89419 14.94975 5.97487 2.47487 12.67878 4.57297 4.57297 12.67878 3.5 3.5 14.94975
4 1 4.94975 0 14.94975 6.46716 0 12.67878 5.97487 2.47487 12.67878 4.57297 1.89419 14.94975
4 1 6.46716 0 12.67878 4.94975 0 14.94975 4.57297 -1.89419 14.94975 5.97487 -2.47487 12.67878
4 1 3.5 -3.5 14.94975 4.57297 -4.57297 12.67878 5.97487 -2.47487 12.67878 4.57297 -1.89419 14.94975
4 1 4.94975 4.94975 10 4.57297 4.57297 12.67878 5.97487 2.47487 12.67878 6.46716 2.67878 10
4 1 6.46716 0 12.67878 7 0 10 6.46716 2.67878 10 5.97487 2.47487 12.67878
4 1 7 0 10 6.46716 0 12.67878 5.97487 -2.47487 12.67878 6.46716 -2.67878 10
4 1 4.57297 -4.57297 12.67878 4.94975 -4.94975 10 6.46716 -2.67878 10 5.97487 -2.47487 12.67878
4 4 4.94975 -4.94975 10 2.67878 -6.46716 10 0 -7 10 6.46716 -2.67878 10
4 4 0 -7 10 0 7 10 2.67878 6.46716 10 6.46716 -2.67878 10
3 4 6.46716 -2.67878 10 6.46716 2.67878 10 7 0 10
4 4 6.46716 2.67878 10 6.46716 -2.67878 10 2.67878 6.46716 10 4.94975 4.94975 10
4 1 2.67878 0 16.46716 4.94975 0 14.94975 4.57297 1.89419 14.94975 2.5 1.03553 16.44898
3 1 2.5 1.03553 16.44898 0 0 17 2.67878 0 16.46716
4 1 2.5 1.03553 16.44898 4.57297 1.89419 14.94975 3.5 3.5 14.94975 2.5 2 16.08394
4 1 2.5 2 16.08394 2 2 16.36717 1.89419 1.89419 16.46716 2.5 1.03553 16.44898
3 1 2.5 1.03553 16.44898 1.89419 1.89419 16.46716 0 0 17
4 1 2.47487 5.97487 12.67878 2.39713 5.78718 12.98283 2.5 5.31083 13.5 4.57297 4.57297 12.67878
4 1 3.5 3.5 14.94975 4.57297 4.57297 12.67878 2.5 5.31083 13.5 2.5 4.16818 14.94975
3 1 1.89419 1.89419 16.46716 2 2 16.36717 1.73583 2 16.46716
3 1 2.5 2 16.08394 3.5 3.5 14.94975 2.5 4.16818 14.94975
3 1 1.89419 1.89419 16.46716 1.73583 2 16.46716 0 0 17
3 1 2.39713 5.78718 12.98283 2.47487 5.97487 12.67878 2.33665 6.00237 12.67878
3 1 1.73583 2 16.46716 0 2 16.60218 0 0 17
3 1 2.33665 -6.00237 12.67878 2.47487 -5.97487 12.67878 2.39713 -5.78718 12.98283
3 1 2.39713 -5.78718 12.98283 2.47487 -5.97487 12.67878 4.57297 -4.57297 12.67878
3 1 0 -2 16.60218 1.73583 -2 16.46716 0 0 17
4 1 2.5 -4.16818 14.94975 2.39713 -5.78718 12.98283 4.57297 -4.57297 12.67878 3.5 -3.5 14.94975
3 1 2.5 -4.16818 14.94975 3.5 -3.5 14.94975 2.5 -2 16.08394
3 1 1.73583 -2 16.46716 2 -2 16.36717 1.89419 -1.89419 16.46716
3 1 1.73583 -2 16.46716 1.89419 -1.89419 16.46716 0 0 17
4 1 3.5 -3.5 14.94975 4.57297 -1.89419 14.94975 2.47487 -1.02513 16.46716 2.5 -2 16.08394
3 1 1.89419 -1.89419 16.46716 2.47487 -1.02513 16.46716 0 0 17
4 1 2.5 -2 16.08394 2.47487 -1.02513 16.46716 1.89419 -1.89419 16.46716 2 -2 16.36717
4 1 2.47487 -1.02513 16.46716 4.57297 -1.89419 14.94975 4.94975 0 14.94975 2.67878 0 16.46716
3 1 2.47487 -1.02513 16.46716 2.67878 0 16.46716 0 0 17
4 1 4.57297 4.57297 12.67878 4.94975 4.94975 10 2.67878 6.46716 10 2.47487 5.97487 12.67878
4 1 2.33665 6.00237 12.67878 2.47487 5.97487 12.67878 2.67878 6.46716 10 1.76777 6.30381 11.73223
4 1 1.76777 6.30381 11.73223 2.67878 6.46716 10 0 7 10 .95671 6.57293 11.1903
3 1 .95671 6.57293 11.1903 0 7 10 0 6.80109 11
3 1 1.76777 -6.30381 11.73223 .95671 -6.57293 11.1903 2.67878 -6.46716 10
4 1 0 -7 10 2.67878 -6.46716 10 .95671 -6.57293 11.1903 0 -6.80109 11
4 1 2.47487 -5.97487 12.67878 2.33665 -6.00237 12.67878 1.76777 -6.30381 11.73223 2.67878 -6.46716 10
4 1 4.94975 -4.94975 10 4.57297 -4.57297 12.67878 2.47487 -5.97487 12.67878 2.67878 -6.46716 10
4 4 2.5 4.16818 14.94975 2.5 5.31083 13.5 2.5 2 13.5 2.5 2 16.08394
3 4 2.5 -4.16818 14.94975 2.5 -2 16.08394 2.5 -2 13.5
3 4 2.5 -4.16818 14.94975 2.5 -2 13.5 2.39713 -5.78718 12.98283
4 4 0 2 16.60218 1.73583 2 16.46716 2 2 16.36717 0 2 16
4 4 2 2 16.36717 2.5 2 16.08394 2.5 2 13.5 2.3097 2 14.45671
3 4 .95671 2 15.8097 2 2 16.36717 1.76777 2 15.26777
3 4 .95671 2 15.8097 0 2 16 2 2 16.36717
4 14 0 -6.80109 11 .95671 -6.57293 11.1903 .95671 6.57293 11.1903 0 6.80109 11
4 14 2.33665 6.00237 12.67878 1.76777 6.30381 11.73223 1.76777 -6.30381 11.73223 2.33665 -6.00237 12.67878
4 14 .95671 -6.57293 11.1903 1.76777 -6.30381 11.73223 1.76777 6.30381 11.73223 .95671 6.57293 11.1903
3 14 2.5 2 13.5 2.33665 6.00237 12.67878 2.33665 -6.00237 12.67878
4 14 2.5 5.31083 13.5 2.39713 5.78718 12.98283 2.33665 6.00237 12.67878 2.5 2 13.5
4 4 1.73583 -2 16.46716 0 -2 16.60218 0 -2 16 .95671 -2 15.8097
4 4 2 -2 16.36717 2.3097 -2 14.45671 2.5 -2 13.5 2.5 -2 16.08394
4 4 1.76777 -2 15.26777 2.3097 -2 14.45671 2 -2 16.36717 1.73583 -2 16.46716
3 4 .95671 -2 15.8097 1.76777 -2 15.26777 1.73583 -2 16.46716
4 14 2.39713 -5.78718 12.98283 2.5 -2 13.5 2.5 2 13.5 2.33665 -6.00237 12.67878
4 14 2.3097 -2 14.45671 1.76777 -2 15.26777 1.76777 2 15.26777 2.3097 2 14.45671
4 14 2.5 -2 13.5 2.3097 -2 14.45671 2.3097 2 14.45671 2.5 2 13.5
4 14 .95671 -2 15.8097 0 -2 16 0 2 16 .95671 2 15.8097
4 14 .95671 2 15.8097 1.76777 2 15.26777 1.76777 -2 15.26777 .95671 -2 15.8097
3 4 2.3097 2 14.45671 1.76777 2 15.26777 2 2 16.36717
(2016-07-21, 8:05)Philippe Hurbain Wrote: [ -> ]Apart for leaning purpose I really don't think it's a good idea to really cut the sphere. Interpenetrating cyli/sphe primitives will give a much better visual result and simpler code. There is an existing cyli to sphe primitive too (not on my computer, can't find it)

Are you thinking of 4-4cyl1sph2.dat?

[Image: cyl-sph.png]
A cylinder with a jagged edge line, creating the edgelines in the intersection between the ball and the cyli.
You can take a look what you'll get in a few hours:
https://github.com/nilsschmidt1337/ldpar...5?closed=1

...but I am going to eat a very delicious burger first :P
Pages: 1 2