.. | .. |
---|
83 | 83 | |
---|
84 | 84 | void CloneSelection(boolean supports) |
---|
85 | 85 | { |
---|
86 | | - // Object3D keep = GraphreeD.clipboard; |
---|
| 86 | + // Object3D keep = GrafreeD.clipboard; |
---|
87 | 87 | //Object3D obj; |
---|
88 | 88 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
89 | 89 | { |
---|
.. | .. |
---|
97 | 97 | |
---|
98 | 98 | void CloneClipboard(boolean supports) |
---|
99 | 99 | { |
---|
100 | | - assert(GraphreeD.clipboard.parent == null); |
---|
101 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
102 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
103 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
104 | | - makeSomething(CloneObject(GraphreeD.clipboard.get(0), false)); |
---|
| 100 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 101 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 102 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 103 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 104 | + makeSomething(CloneObject(GrafreeD.clipboard.get(0), false)); |
---|
105 | 105 | else |
---|
106 | | - makeSomething(CloneObject(GraphreeD.clipboard, false)); |
---|
107 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 106 | + makeSomething(CloneObject(GrafreeD.clipboard, false)); |
---|
| 107 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
108 | 108 | } |
---|
109 | 109 | |
---|
110 | 110 | static Object3D CloneObject(Object3D obj, boolean supports) |
---|
.. | .. |
---|
118 | 118 | // obj.support = null; |
---|
119 | 119 | if (!supports) |
---|
120 | 120 | obj.SaveSupports(); |
---|
121 | | - Object3D clone = (Object3D)GraphreeD.clone(obj); |
---|
| 121 | + Object3D clone = (Object3D)GrafreeD.clone(obj); |
---|
122 | 122 | obj.parent = parent; |
---|
123 | 123 | // obj.support = support; |
---|
124 | 124 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
225 | 225 | oe.menuBar.add(menu = new Menu("Group")); |
---|
226 | 226 | grabItem = menu.add(new MenuItem("Grab")); |
---|
227 | 227 | grabItem.addActionListener(this); |
---|
228 | | - frontItem = menu.add(new MenuItem("Front")); |
---|
229 | | - frontItem.addActionListener(this); |
---|
230 | 228 | backItem = menu.add(new MenuItem("Back")); |
---|
231 | 229 | backItem.addActionListener(this); |
---|
| 230 | + frontItem = menu.add(new MenuItem("Front")); |
---|
| 231 | + frontItem.addActionListener(this); |
---|
232 | 232 | compositeItem = menu.add(new MenuItem("Composite")); |
---|
233 | 233 | compositeItem.addActionListener(this); |
---|
234 | 234 | menu.add("-"); |
---|
.. | .. |
---|
285 | 285 | genNormalsORGANItem.addActionListener(this); |
---|
286 | 286 | genNormalsCADItem = menu.add(new MenuItem("CAD Normals")); |
---|
287 | 287 | genNormalsCADItem.addActionListener(this); |
---|
| 288 | + genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
| 289 | + genNormalsMESHItem.addActionListener(this); |
---|
288 | 290 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
289 | 291 | stripifyItem.addActionListener(this); |
---|
290 | 292 | unstripifyItem = menu.add(new MenuItem("Unstripify")); |
---|
.. | .. |
---|
380 | 382 | |
---|
381 | 383 | |
---|
382 | 384 | oe.menuBar.add(menu = new Menu("Include")); |
---|
383 | | - importGFDItem = menu.add(new MenuItem("GraphreeD Object...")); |
---|
| 385 | + importGFDItem = menu.add(new MenuItem("GrafreeD Object...")); |
---|
384 | 386 | importGFDItem.addActionListener(this); |
---|
385 | 387 | importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object...")); |
---|
386 | 388 | importVRMLX3DItem.addActionListener(this); |
---|
.. | .. |
---|
1441 | 1443 | |
---|
1442 | 1444 | void Overwrite(int mask) |
---|
1443 | 1445 | { |
---|
1444 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1446 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1445 | 1447 | { |
---|
1446 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1448 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
1447 | 1449 | |
---|
1448 | 1450 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1449 | 1451 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
1778 | 1780 | if (event.getSource() == invariantsItem) |
---|
1779 | 1781 | { |
---|
1780 | 1782 | System.out.println("Invariants:"); |
---|
1781 | | - GraphreeD.theApplet3D.universe.invariants(); |
---|
| 1783 | + GrafreeD.theApplet3D.universe.invariants(); |
---|
1782 | 1784 | } else |
---|
1783 | 1785 | if (event.getSource() == memoryItem) |
---|
1784 | 1786 | { |
---|
.. | .. |
---|
1848 | 1850 | } else |
---|
1849 | 1851 | if (event.getSource() == duplicateItem) |
---|
1850 | 1852 | { |
---|
1851 | | - Object3D keep = GraphreeD.clipboard; |
---|
| 1853 | + Object3D keep = GrafreeD.clipboard; |
---|
1852 | 1854 | loadClipboard(false); |
---|
1853 | 1855 | paste(false); |
---|
1854 | | - GraphreeD.clipboard = keep; |
---|
| 1856 | + GrafreeD.clipboard = keep; |
---|
1855 | 1857 | } else |
---|
1856 | 1858 | if (event.getSource() == cloneItem) |
---|
1857 | 1859 | { |
---|
.. | .. |
---|
1895 | 1897 | } else |
---|
1896 | 1898 | if (event.getSource() == overwriteMatItem) |
---|
1897 | 1899 | { |
---|
| 1900 | + /* july 2015 |
---|
1898 | 1901 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
1899 | | - Overwrite(Object3D.MATERIAL); |
---|
| 1902 | + Overwrite(Object3D.MATERIAL | Object3D.COLOR); |
---|
1900 | 1903 | else |
---|
1901 | 1904 | { |
---|
1902 | 1905 | if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0) |
---|
.. | .. |
---|
1908 | 1911 | Overwrite(Object3D.MATERIAL | Object3D.TEXTURE); |
---|
1909 | 1912 | } |
---|
1910 | 1913 | } |
---|
| 1914 | + */ |
---|
| 1915 | + |
---|
| 1916 | + Overwrite(dropAttributes); |
---|
1911 | 1917 | } |
---|
1912 | 1918 | if (event.getSource() == overwriteGeoItem) |
---|
1913 | 1919 | { |
---|
1914 | 1920 | Overwrite(Object3D.GEOMETRY); |
---|
1915 | | -// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 1921 | +// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
1916 | 1922 | // { |
---|
1917 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 1923 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
1918 | 1924 | // |
---|
1919 | 1925 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
1920 | 1926 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2047 | 2053 | } else |
---|
2048 | 2054 | if (event.getSource() == linkverticesItem) |
---|
2049 | 2055 | { |
---|
2050 | | -// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2056 | +// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2051 | 2057 | // { |
---|
2052 | | -// Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2058 | +// Object3D content = GrafreeD.clipboard.get(0); |
---|
2053 | 2059 | // |
---|
2054 | 2060 | // if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2055 | 2061 | // content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2058 | 2064 | // group.selection.get(0).setMasterThis(content); // should be identity |
---|
2059 | 2065 | // refreshContents(); |
---|
2060 | 2066 | // } |
---|
2061 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 2067 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
2062 | 2068 | { |
---|
2063 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2069 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2064 | 2070 | |
---|
2065 | 2071 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2066 | 2072 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2101 | 2107 | } else |
---|
2102 | 2108 | if (event.getSource() == setMasterItem) |
---|
2103 | 2109 | { |
---|
2104 | | - if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1) |
---|
| 2110 | + if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2105 | 2111 | { |
---|
2106 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2112 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2107 | 2113 | |
---|
2108 | 2114 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2109 | 2115 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2116 | 2122 | { |
---|
2117 | 2123 | if (group.selection.size() == 1) |
---|
2118 | 2124 | { |
---|
2119 | | - if (GraphreeD.clipboard.size() == 1) |
---|
| 2125 | + if (GrafreeD.clipboard.size() == 1) |
---|
2120 | 2126 | { |
---|
2121 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 2127 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
2122 | 2128 | |
---|
2123 | 2129 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2124 | 2130 | content = ((cGroup)content).get(0); |
---|
.. | .. |
---|
2304 | 2310 | if (event.getSource() == genNormalsCADItem) |
---|
2305 | 2311 | { |
---|
2306 | 2312 | GenNormals(true); |
---|
| 2313 | + } else |
---|
| 2314 | + if (event.getSource() == genNormalsMESHItem) |
---|
| 2315 | + { |
---|
| 2316 | + GenNormals(true); // TODO |
---|
2307 | 2317 | } else |
---|
2308 | 2318 | if (event.getSource() == genNormalsORGANItem) |
---|
2309 | 2319 | { |
---|
.. | .. |
---|
2806 | 2816 | if (event.getSource() == unselectButton) |
---|
2807 | 2817 | { |
---|
2808 | 2818 | objEditor.jTree.clearSelection(); |
---|
2809 | | - // ?? oct 2012 GraphreeD.clipboard.clear(); |
---|
| 2819 | + // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2810 | 2820 | objEditor.ResetSliders(); |
---|
2811 | 2821 | refreshContents(true); |
---|
2812 | 2822 | } else |
---|
.. | .. |
---|
3121 | 3131 | obj = (Object3D)e.nextElement(); |
---|
3122 | 3132 | |
---|
3123 | 3133 | System.out.println("Object is: " + obj); |
---|
3124 | | - GraphreeD.AnalyzeObject(obj); |
---|
| 3134 | + GrafreeD.AnalyzeObject(obj); |
---|
3125 | 3135 | System.out.println("Boundary rep: " + obj.bRep); |
---|
3126 | | - GraphreeD.AnalyzeObject(obj.bRep); |
---|
| 3136 | + GrafreeD.AnalyzeObject(obj.bRep); |
---|
3127 | 3137 | |
---|
3128 | 3138 | // System.err.println((size/1024) + " KB is the size of " + obj); |
---|
3129 | 3139 | } |
---|
.. | .. |
---|
3250 | 3260 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3251 | 3261 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3252 | 3262 | // |
---|
3253 | | -// g.add(GraphreeD.clipboard); |
---|
| 3263 | +// g.add(GrafreeD.clipboard); |
---|
3254 | 3264 | // |
---|
3255 | 3265 | // buffer.add(g); |
---|
3256 | 3266 | // } |
---|
.. | .. |
---|
3269 | 3279 | // nodes = new Object3D(); |
---|
3270 | 3280 | // vertices = new Vector<Vertex>(); |
---|
3271 | 3281 | // |
---|
3272 | | -// boolean epsequal = GraphreeD.epsequal; |
---|
3273 | | -// GraphreeD.epsequal = true; |
---|
| 3282 | +// boolean epsequal = GrafreeD.epsequal; |
---|
| 3283 | +// GrafreeD.epsequal = true; |
---|
3274 | 3284 | // |
---|
3275 | 3285 | // for (int i=0; i<group.selection.size(); i++) |
---|
3276 | 3286 | // { |
---|
.. | .. |
---|
3311 | 3321 | // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3312 | 3322 | // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3313 | 3323 | // |
---|
3314 | | -// g.add(GraphreeD.clipboard); |
---|
| 3324 | +// g.add(GrafreeD.clipboard); |
---|
3315 | 3325 | // |
---|
3316 | 3326 | // buffer.add(g); |
---|
3317 | 3327 | // } |
---|
.. | .. |
---|
3319 | 3329 | // makeSomething(buffer, i==group.selection.size()-1); |
---|
3320 | 3330 | // } |
---|
3321 | 3331 | // |
---|
3322 | | -// GraphreeD.epsequal = epsequal; |
---|
| 3332 | +// GrafreeD.epsequal = epsequal; |
---|
3323 | 3333 | // |
---|
3324 | 3334 | // //buffer = null; |
---|
3325 | 3335 | // temprep = null; |
---|
.. | .. |
---|
3330 | 3340 | |
---|
3331 | 3341 | void ParseVertices() |
---|
3332 | 3342 | { |
---|
3333 | | - boolean epsequal = GraphreeD.epsequal; |
---|
3334 | | - GraphreeD.epsequal = true; |
---|
| 3343 | + boolean epsequal = GrafreeD.epsequal; |
---|
| 3344 | + GrafreeD.epsequal = true; |
---|
3335 | 3345 | |
---|
3336 | 3346 | for (int i=0; i<group.selection.size(); i++) |
---|
3337 | 3347 | { |
---|
.. | .. |
---|
3356 | 3366 | LA.matTranslate(g.toParent, temp.x, temp.y, temp.z); |
---|
3357 | 3367 | LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z); |
---|
3358 | 3368 | |
---|
3359 | | - g.add(GraphreeD.clipboard); |
---|
| 3369 | + g.add(GrafreeD.clipboard); |
---|
3360 | 3370 | |
---|
3361 | 3371 | buffer.add(g); |
---|
3362 | 3372 | } |
---|
.. | .. |
---|
3371 | 3381 | makeSomething(buffer, i==group.selection.size()-1); |
---|
3372 | 3382 | } |
---|
3373 | 3383 | |
---|
3374 | | - GraphreeD.epsequal = epsequal; |
---|
| 3384 | + GrafreeD.epsequal = epsequal; |
---|
3375 | 3385 | |
---|
3376 | 3386 | refreshContents(); |
---|
3377 | 3387 | } |
---|
.. | .. |
---|
3416 | 3426 | scale /= 3; |
---|
3417 | 3427 | |
---|
3418 | 3428 | scale /= 0xFF; |
---|
3419 | | - scale /= 4; |
---|
| 3429 | + // c'est quoi ca? scale /= 4; |
---|
3420 | 3430 | |
---|
3421 | 3431 | //v.AO = scale; |
---|
3422 | 3432 | |
---|
.. | .. |
---|
3455 | 3465 | // ref.SaveSupports(); |
---|
3456 | 3466 | // Object3D par = ref.parent; |
---|
3457 | 3467 | // ref.parent = null; |
---|
3458 | | -// Object3D lowres = (Object3D) GraphreeD.clone(ref); |
---|
| 3468 | +// Object3D lowres = (Object3D) GrafreeD.clone(ref); |
---|
3459 | 3469 | // ref.parent = par; |
---|
3460 | 3470 | // ref.RestoreSupports(); |
---|
3461 | 3471 | |
---|
.. | .. |
---|
3485 | 3495 | // lowres.SaveSupports(); |
---|
3486 | 3496 | // par = lowres.parent; |
---|
3487 | 3497 | // lowres.parent = null; |
---|
3488 | | -// Object3D newlow = (Object3D) GraphreeD.clone(lowres); |
---|
| 3498 | +// Object3D newlow = (Object3D) GrafreeD.clone(lowres); |
---|
3489 | 3499 | Object3D newlow = CloneObject(lowres, false); |
---|
3490 | 3500 | newlow.name = sn.switchobject.get(i).name; |
---|
3491 | 3501 | System.out.println(" pose#" + i + " = " + newlow); |
---|
.. | .. |
---|
3507 | 3517 | return; |
---|
3508 | 3518 | |
---|
3509 | 3519 | Object3D poses = group.selection.get(0); |
---|
3510 | | - Object3D ref = GraphreeD.clipboard.get(0); |
---|
| 3520 | + Object3D ref = GrafreeD.clipboard.get(0); |
---|
3511 | 3521 | |
---|
3512 | 3522 | Object3D newgroup = new Object3D("Po:" + poses.name); |
---|
3513 | 3523 | |
---|
.. | .. |
---|
3701 | 3711 | |
---|
3702 | 3712 | void ClipMesh() |
---|
3703 | 3713 | { |
---|
3704 | | - if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1) |
---|
| 3714 | + if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
3705 | 3715 | { |
---|
3706 | | - Object3D content = GraphreeD.clipboard.get(0); |
---|
| 3716 | + Object3D content = GrafreeD.clipboard.get(0); |
---|
3707 | 3717 | |
---|
3708 | 3718 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
3709 | 3719 | content = ((cGroup)content).get(0); |
---|
3710 | 3720 | |
---|
3711 | 3721 | // for (int i=0; i<group.selection.size(); i++) |
---|
3712 | 3722 | // { |
---|
3713 | | -// group.selection.get(i).ClipMesh(GraphreeD.clipboard); |
---|
| 3723 | +// group.selection.get(i).ClipMesh(GrafreeD.clipboard); |
---|
3714 | 3724 | // } |
---|
3715 | | - group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3725 | + group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3716 | 3726 | } |
---|
3717 | | -// group.selection.ClipMesh(GraphreeD.clipboard); |
---|
| 3727 | +// group.selection.ClipMesh(GrafreeD.clipboard); |
---|
3718 | 3728 | System.out.println("DONE."); |
---|
3719 | 3729 | refreshContents(); |
---|
3720 | 3730 | } |
---|
.. | .. |
---|
4052 | 4062 | { |
---|
4053 | 4063 | if (group.selection.isEmpty()) |
---|
4054 | 4064 | return; |
---|
4055 | | - GraphreeD.clipboardIsTempGroup = false; |
---|
| 4065 | + GrafreeD.clipboardIsTempGroup = false; |
---|
4056 | 4066 | Composite tGroup = null; |
---|
4057 | 4067 | if (group.selection.size() > 0) // 1) |
---|
4058 | 4068 | { |
---|
4059 | 4069 | tGroup = new cGroup(); |
---|
4060 | | - GraphreeD.clipboardIsTempGroup = true; |
---|
| 4070 | + GrafreeD.clipboardIsTempGroup = true; |
---|
4061 | 4071 | } |
---|
4062 | 4072 | |
---|
4063 | 4073 | if (cut) |
---|
.. | .. |
---|
4097 | 4107 | //System.out.println("cut " + child); |
---|
4098 | 4108 | //System.out.println("parent = " + child.parent); |
---|
4099 | 4109 | // tmp.addChild(child); |
---|
4100 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4110 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4101 | 4111 | tGroup.add/*Child*/(tmp); |
---|
4102 | 4112 | else |
---|
4103 | | - GraphreeD.clipboard = tmp; |
---|
| 4113 | + GrafreeD.clipboard = tmp; |
---|
4104 | 4114 | } |
---|
4105 | 4115 | else |
---|
4106 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4116 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4107 | 4117 | tGroup.add/*Child*/(child); |
---|
4108 | 4118 | else |
---|
4109 | | - GraphreeD.clipboard = child; |
---|
| 4119 | + GrafreeD.clipboard = child; |
---|
4110 | 4120 | } |
---|
4111 | 4121 | |
---|
4112 | 4122 | //ResetModel(); |
---|
.. | .. |
---|
4138 | 4148 | //System.out.println("cut " + elem); |
---|
4139 | 4149 | //System.out.println("parent = " + elem.parent); |
---|
4140 | 4150 | // tmp.addChild(elem); |
---|
4141 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4151 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4142 | 4152 | tGroup.add/*Child*/(tmp); |
---|
4143 | 4153 | else |
---|
4144 | | - GraphreeD.clipboard = tmp; |
---|
| 4154 | + GrafreeD.clipboard = tmp; |
---|
4145 | 4155 | } |
---|
4146 | 4156 | else |
---|
4147 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4157 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4148 | 4158 | tGroup.add/*Child*/(child); |
---|
4149 | 4159 | else |
---|
4150 | | - GraphreeD.clipboard = child; |
---|
| 4160 | + GrafreeD.clipboard = child; |
---|
4151 | 4161 | } |
---|
4152 | 4162 | |
---|
4153 | 4163 | } |
---|
4154 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
4155 | | - GraphreeD.clipboard = tGroup; |
---|
| 4164 | + if (GrafreeD.clipboardIsTempGroup) |
---|
| 4165 | + GrafreeD.clipboard = tGroup; |
---|
4156 | 4166 | if (cut) |
---|
4157 | 4167 | { |
---|
4158 | 4168 | ResetModel(); |
---|
.. | .. |
---|
4162 | 4172 | |
---|
4163 | 4173 | void paste(boolean expand) |
---|
4164 | 4174 | { |
---|
4165 | | - // if (GraphreeD.clipboard == null) |
---|
| 4175 | + // if (GrafreeD.clipboard == null) |
---|
4166 | 4176 | // return; |
---|
4167 | 4177 | boolean first = true; |
---|
4168 | 4178 | |
---|
4169 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4179 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4170 | 4180 | { |
---|
4171 | 4181 | Composite temp; |
---|
4172 | 4182 | |
---|
.. | .. |
---|
4177 | 4187 | temp = (Composite)Applet3D.clipboard.deepCopy(); |
---|
4178 | 4188 | */ |
---|
4179 | 4189 | Object3D elem; |
---|
4180 | | - for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
| 4190 | + for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name)) |
---|
4181 | 4191 | { |
---|
4182 | 4192 | Object3D child = (Object3D)e.nextElement(); |
---|
4183 | 4193 | |
---|
.. | .. |
---|
4191 | 4201 | else |
---|
4192 | 4202 | elem = child.deepCopy(); // ? |
---|
4193 | 4203 | child.parent = keepparent; |
---|
4194 | | - //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
| 4204 | + //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent)) |
---|
4195 | 4205 | // elem = elem.get(0); |
---|
4196 | 4206 | makeSomething(elem, true); // ?? first); |
---|
4197 | 4207 | //group.addChild(elem); |
---|
.. | .. |
---|
4211 | 4221 | //Object3D cb = Applet3D.clipboard; |
---|
4212 | 4222 | //temp.addChild(cb); |
---|
4213 | 4223 | //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0)); |
---|
4214 | | - assert(GraphreeD.clipboard.parent == null); |
---|
4215 | | - Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent; |
---|
4216 | | - GraphreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
4217 | | - if (LA.isIdentity(GraphreeD.clipboard.toParent)) |
---|
4218 | | - makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy()); |
---|
| 4224 | + assert(GrafreeD.clipboard.parent == null); |
---|
| 4225 | + Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent; |
---|
| 4226 | + GrafreeD.clipboard.get(0).parent = null; // Avoid copy? |
---|
| 4227 | + if (LA.isIdentity(GrafreeD.clipboard.toParent)) |
---|
| 4228 | + makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy()); |
---|
4219 | 4229 | else |
---|
4220 | | - makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy()); |
---|
4221 | | - GraphreeD.clipboard.get(0).parent = keepparent; |
---|
| 4230 | + makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy()); |
---|
| 4231 | + GrafreeD.clipboard.get(0).parent = keepparent; |
---|
4222 | 4232 | } |
---|
4223 | 4233 | |
---|
4224 | 4234 | ResetModel(); |
---|
.. | .. |
---|
4227 | 4237 | |
---|
4228 | 4238 | void pasteInto(boolean copyit) |
---|
4229 | 4239 | { |
---|
4230 | | -// if (GraphreeD.clipboard == null) |
---|
| 4240 | +// if (GrafreeD.clipboard == null) |
---|
4231 | 4241 | // return; |
---|
4232 | 4242 | |
---|
4233 | 4243 | if (group.selection.size() != 1) |
---|
.. | .. |
---|
4260 | 4270 | { |
---|
4261 | 4271 | boolean first = true; |
---|
4262 | 4272 | |
---|
4263 | | - if (GraphreeD.clipboardIsTempGroup) |
---|
| 4273 | + if (GrafreeD.clipboardIsTempGroup) |
---|
4264 | 4274 | { |
---|
4265 | | - Composite temp = (Composite)GraphreeD.clipboard; |
---|
| 4275 | + Composite temp = (Composite)GrafreeD.clipboard; |
---|
4266 | 4276 | Object3D copy; |
---|
4267 | 4277 | for (Enumeration e = temp.children.elements(); e.hasMoreElements();) |
---|
4268 | 4278 | { |
---|
.. | .. |
---|
4272 | 4282 | } |
---|
4273 | 4283 | } else |
---|
4274 | 4284 | { |
---|
4275 | | - linkSomething(GraphreeD.clipboard); //.get(0)); |
---|
| 4285 | + linkSomething(GrafreeD.clipboard); //.get(0)); |
---|
4276 | 4286 | } |
---|
4277 | 4287 | } |
---|
4278 | 4288 | } |
---|
.. | .. |
---|
4659 | 4669 | |
---|
4660 | 4670 | void ImportGFD() |
---|
4661 | 4671 | { |
---|
4662 | | - FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD); |
---|
| 4672 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
4663 | 4673 | browser.show(); |
---|
4664 | 4674 | String filename = browser.getFile(); |
---|
4665 | 4675 | if (filename != null && filename.length() > 0) |
---|
.. | .. |
---|
4697 | 4707 | |
---|
4698 | 4708 | void ImportVRMLX3D() |
---|
4699 | 4709 | { |
---|
4700 | | - if (GraphreeD.standAlone) |
---|
| 4710 | + if (GrafreeD.standAlone) |
---|
4701 | 4711 | { |
---|
4702 | 4712 | /**/ |
---|
4703 | 4713 | FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
.. | .. |
---|
4714 | 4724 | |
---|
4715 | 4725 | String GetFile(String dialogName) |
---|
4716 | 4726 | { |
---|
4717 | | - if (GraphreeD.standAlone) |
---|
| 4727 | + if (GrafreeD.standAlone) |
---|
4718 | 4728 | { |
---|
4719 | 4729 | FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD); |
---|
4720 | 4730 | browser.show(); |
---|
.. | .. |
---|
4841 | 4851 | private MenuItem clearItem; |
---|
4842 | 4852 | private MenuItem clearAllItem; |
---|
4843 | 4853 | private MenuItem genUVItem; |
---|
| 4854 | + private MenuItem genNormalsMESHItem; |
---|
4844 | 4855 | private MenuItem genNormalsCADItem; |
---|
4845 | 4856 | private MenuItem genNormalsORGANItem; |
---|
4846 | 4857 | private MenuItem stripifyItem; |
---|