BoundaryRep.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
Object3D.java | ●●●●● patch | view | raw | blame | history | |
cFileSystemModel.java | ●●●●● patch | view | raw | blame | history | |
icons/XYZ.png | patch | view | raw | blame | history | |
icons/XYZ100.png | patch | view | raw | blame | history | |
icons/XYZ70.png | patch | view | raw | blame | history | |
icons/info.png | patch | view | raw | blame | history | |
icons/material.gfd | patch | view | raw | blame | history | |
icons/material.png | patch | view | raw | blame | history | |
icons/material600.png | patch | view | raw | blame | history | |
icons/material760.png | patch | view | raw | blame | history | |
icons/openwindow-200.png | patch | view | raw | blame | history | |
icons/openwindow.png | patch | view | raw | blame | history | |
icons/primitives.png | patch | view | raw | blame | history | |
icons/primitives512.png | patch | view | raw | blame | history |
BoundaryRep.java
.. .. @@ -4001,7 +4001,7 @@ 4001 4001 NormalGenerator ng; 4002 4002 4003 4003 if (crease) 4004 - ng = new NormalGenerator(Math.PI/6); // default is 44 degrees (or Math.PI/3); // /4);4004 + ng = new NormalGenerator(Math.PI/4); // default is 44 degrees (or Math.PI/3); // /4);4005 4005 else 4006 4006 ng = new NormalGenerator(Math.PI); // (Math.PI / 3); // /4); 4007 4007 GroupEditor.java
.. .. @@ -206,8 +206,8 @@ 206 206 // pasteExpandItem = menu.add(new MenuItem("Paste expand")); 207 207 // pasteExpandItem.addActionListener(this); 208 208 menu.add("-"); 209 - clearItem = menu.add(new MenuItem("Clear"));210 - clearItem.addActionListener(this);209 + deleteItem = menu.add(new MenuItem("Delete"));210 + deleteItem.addActionListener(this);211 211 212 212 if (Globals.ADVANCED) 213 213 { .. .. @@ -433,7 +433,7 @@ 433 433 genNormalsMESHItem.addActionListener(this); 434 434 if (Globals.ADVANCED) 435 435 { 436 - genNormalsMINEItem = menu.add(new MenuItem("My Normals"));436 + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));437 437 genNormalsMINEItem.addActionListener(this); 438 438 } 439 439 stripifyItem = menu.add(new MenuItem("Stripify")); .. .. @@ -685,27 +685,28 @@ 685 685 686 686 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); 687 687 688 - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);689 - twoButton.setToolTipText("Show center view only");690 - twoButton.addActionListener(this);691 - this.fullscreenLayout = twoButton;692 -693 688 oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 694 689 fourButton.addActionListener(this); 695 690 fourButton.setToolTipText("Show left panel only"); 691 +692 + oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);693 + twoButton.setToolTipText("Show right view only");694 + twoButton.addActionListener(this);695 + this.fullscreenLayout = twoButton;696 +696 697 oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); 697 - sixButton.setToolTipText("2-column layout left");698 + sixButton.setToolTipText("Show left and right");698 699 sixButton.addActionListener(this); 699 - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);700 - threeButton.setToolTipText("2-column layout right");701 - threeButton.addActionListener(this);702 - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);703 - sevenButton.setToolTipText("3-column layout");704 - sevenButton.addActionListener(this);700 +// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);701 +// threeButton.setToolTipText("2-column layout right");702 +// threeButton.addActionListener(this);703 +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);704 +// sevenButton.setToolTipText("3-column layout");705 +// sevenButton.addActionListener(this);705 706 // 706 707 707 - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);708 - rootButton.setToolTipText("Edit selection in new tab");708 + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);709 + rootButton.setToolTipText("Open selection in new tab");709 710 rootButton.addActionListener(this); 710 711 711 712 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); .. .. @@ -871,7 +872,7 @@ 871 872 dgr.addDragGestureListener(this); 872 873 }catch(Exception e) {} 873 874 */ 874 - radio.layout = sevenButton;875 + radio.layout = sixButton; // sevenButton;875 876 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); 876 877 } 877 878 .. .. @@ -1013,7 +1014,7 @@ 1013 1014 } 1014 1015 1015 1016 radioButton.SetObject(obj); 1016 - radioButton.layout = sevenButton;1017 + radioButton.layout = sixButton; // sevenButton;1017 1018 radioButton.SetCamera(cameraView.renderCamera, false); 1018 1019 radioButton.addActionListener(this); 1019 1020 radioPanel.add(radioButton); .. .. @@ -1692,6 +1693,16 @@ 1692 1693 listUI.remove(i); 1693 1694 } 1694 1695 } 1696 + }1697 +1698 + private void EditElement(Object3D elem, boolean newWindow)1699 + {1700 + // if (!(elem instanceof Composite))1701 + // newWindow = false;1702 + listUI.add(elem);1703 + elem.openEditWindow(this, newWindow); //, false);1704 + System.out.println("edit : " + elem);1705 + elem.editWindow.refreshContents(true); // ? new1695 1706 } 1696 1707 1697 1708 /** .. .. @@ -2658,7 +2669,7 @@ 2658 2669 { 2659 2670 StepAll(); 2660 2671 } else 2661 - if (source == clearItem) // || event.getSource() == clearButton)2672 + if (source == deleteItem) // || event.getSource() == clearButton)2662 2673 { 2663 2674 //int indices[] = jList.getSelectedIndices(); 2664 2675 //for (int i = indices.length - 1; i >= 0; i--) .. .. @@ -3553,10 +3564,10 @@ 3553 3564 radio.layout.doClick(); 3554 3565 3555 3566 ClearUnpinned(); 3556 - Grafreed.Assert(group != null);3557 - Grafreed.Assert(group.selection != null);3558 - SetPinStates(group.selection.size() > 0);3559 - if (group.selection.size() == 1)3567 + //Grafreed.Assert(group != null);3568 + //Grafreed.Assert(group.selection != null);3569 + SetPinStates(group.selection == null || group.selection.size() > 0);3570 + if (group.selection == null || group.selection.size() == 1)3560 3571 EditSelection(false); 3561 3572 keepparent = group.parent; 3562 3573 // PARENT = NULL or not??? .. .. @@ -4627,6 +4638,12 @@ 4627 4638 4628 4639 void EditSelection(boolean newWindow) 4629 4640 { 4641 + if (group.selection == null)4642 + {4643 + EditElement(group, newWindow); // ? new4644 + return;4645 + }4646 +4630 4647 // aConstraints.gridy = 0; 4631 4648 for (int i=0; i<group.selection.size(); i++) 4632 4649 { .. .. @@ -4637,12 +4654,7 @@ 4637 4654 Object3D elem = (Object3D)group.selection.elementAt(i); 4638 4655 if(elem != group || !newWindow) 4639 4656 { 4640 - // if (!(elem instanceof Composite))4641 - // newWindow = false;4642 - listUI.add(elem);4643 - elem.openEditWindow(this, newWindow); //, false);4644 - System.out.println("edit : " + elem);4645 - elem.editWindow.refreshContents(true); // ? new4657 + EditElement(elem, newWindow); // ? new4646 4658 } 4647 4659 } 4648 4660 } .. .. @@ -5695,7 +5707,7 @@ 5695 5707 private MenuItem pasteLinkItem; 5696 5708 private MenuItem pasteCloneItem; 5697 5709 private MenuItem pasteExpandItem; 5698 - private MenuItem clearItem;5710 + private MenuItem deleteItem;5699 5711 private MenuItem clearAllItem; 5700 5712 private MenuItem genUVItem; 5701 5713 private MenuItem genNormalsMESHItem; ObjEditor.java
.. .. @@ -44,61 +44,47 @@ 44 44 45 45 cButton GetButton(String name, boolean border) 46 46 { 47 - try48 - {49 - ImageIcon icon = GetIcon(name);50 - return new cButton(icon, border);51 - }52 - catch (Exception e)53 - {54 - return new cButton(name, border);55 - }47 + ImageIcon icon = GetIcon(name);48 + return new cButton(icon, border);56 49 } 57 50 58 51 cToggleButton GetToggleButton(String name, boolean border) 59 52 { 60 - try61 - {62 - ImageIcon icon = GetIcon(name);63 - return new cToggleButton(icon, border);64 - }65 - catch (Exception e)66 - {67 - return new cToggleButton(name, border);68 - }53 + ImageIcon icon = GetIcon(name);54 + return new cToggleButton(icon, border);69 55 } 70 56 71 57 cCheckBox GetCheckBox(String name, boolean border) 72 58 { 59 + ImageIcon icon = GetIcon(name);60 + return new cCheckBox(icon, border);61 + }62 +63 + private ImageIcon GetIcon(String name)64 + {73 65 try 74 66 { 75 - ImageIcon icon = GetIcon(name);76 - return new cCheckBox(icon, border);67 + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));68 +69 + if (image.getWidth() != 24 && image.getHeight() != 24)70 + {71 + BufferedImage resized = new BufferedImage(24, 24, image.getType());72 + Graphics2D g = resized.createGraphics();73 + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);74 + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);75 + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null);76 + g.dispose();77 +78 + image = resized;79 + }80 +81 + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);82 + return icon;77 83 } 78 84 catch (Exception e) 79 85 { 80 - return new cCheckBox(name, border);86 + return null;81 87 } 82 - }83 -84 - private ImageIcon GetIcon(String name) throws IOException85 - {86 - BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));87 -88 - if (image.getWidth() != 24 && image.getHeight() != 24)89 - {90 - BufferedImage resized = new BufferedImage(24, 24, image.getType());91 - Graphics2D g = resized.createGraphics();92 - g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);93 - //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);94 - g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null);95 - g.dispose();96 -97 - image = resized;98 - }99 -100 - javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);101 - return icon;102 88 } 103 89 104 90 // SCRIPT .. .. @@ -437,11 +423,12 @@ 437 423 438 424 toolbarPanel = new JPanel(); 439 425 toolbarPanel.setName("Toolbar"); 426 +440 427 treePanel = new cGridBag(); 441 428 treePanel.setName("Tree"); 442 429 443 430 editPanel = new cGridBag().setVertical(true); 444 - editPanel.setName("Edit");431 + //editPanel.setName("Edit");445 432 446 433 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); 447 434 .. .. @@ -450,10 +437,10 @@ 450 437 editPanel.add(ctrlPanel); 451 438 452 439 toolboxPanel = new cGridBag().setVertical(false); 453 - toolboxPanel.setName("Toolbox");440 + //toolboxPanel.setName("Toolbox");454 441 455 442 materialPanel = new cGridBag().setVertical(true); 456 - materialPanel.setName("Material");443 + //materialPanel.setName("Material");457 444 458 445 /*JTextPane*/ 459 446 infoarea = createTextPane(); .. .. @@ -461,6 +448,7 @@ 461 448 462 449 infoarea.setEditable(true); 463 450 SetText(); 451 +464 452 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); 465 453 // infoarea.setOpaque(false); 466 454 // //infoarea.setForeground(textcolor); .. .. @@ -468,7 +456,7 @@ 468 456 // TEXTAREA infoarea.setWrapStyleWord(true); 469 457 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); 470 458 infoPanel.setPreferredSize(new Dimension(1, 1)); 471 - infoPanel.setName("Info");459 + //infoPanel.setName("Info");472 460 //infoPanel.setLayout(new BorderLayout()); 473 461 //infoPanel.add(createTextPane()); 474 462 .. .. @@ -1492,6 +1480,7 @@ 1492 1480 XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); 1493 1481 XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); 1494 1482 XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); 1483 + //XYZPanel.setName("XYZ");1495 1484 1496 1485 /* 1497 1486 gridPanel = new JPanel(); //new BorderLayout()); .. .. @@ -1529,16 +1518,23 @@ 1529 1518 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); 1530 1519 //tmp.setName("Edit"); 1531 1520 objectPanel.add(materialPanel); 1521 + objectPanel.setIconAt(0, GetIcon("icons/material.png"));1532 1522 // JPanel north = new JPanel(new BorderLayout()); 1533 1523 // north.setName("Edit"); 1534 1524 // north.add(ctrlPanel, BorderLayout.NORTH); 1535 1525 // objectPanel.add(north); 1536 1526 objectPanel.add(editPanel); 1527 + objectPanel.setIconAt(1, GetIcon("icons/write.png"));1537 1528 1538 1529 //if (Globals.ADVANCED) 1539 1530 objectPanel.add(infoPanel); 1531 + objectPanel.setIconAt(2, GetIcon("icons/info.png"));1532 +1533 + objectPanel.add(XYZPanel);1534 + objectPanel.setIconAt(3, GetIcon("icons/XYZ.png"));1540 1535 1541 1536 objectPanel.add(toolboxPanel); 1537 + objectPanel.setIconAt(4, GetIcon("icons/primitives.png"));1542 1538 1543 1539 /* 1544 1540 aConstraints.gridx = 0; .. .. @@ -1559,7 +1555,7 @@ 1559 1555 scrollpane.addMouseWheelListener(this); // Default not fast enough 1560 1556 1561 1557 /*JTabbedPane*/ scenePanel = new cGridBag(); 1562 - scenePanel.preferredWidth = 6;1558 + scenePanel.preferredWidth = 5;1563 1559 1564 1560 JTabbedPane tabbedPane = new JTabbedPane(); 1565 1561 tabbedPane.add(scrollpane); .. .. @@ -1637,7 +1633,7 @@ 1637 1633 bigThree = new cGridBag(); 1638 1634 bigThree.addComponent(scenePanel); 1639 1635 bigThree.addComponent(centralPanel); 1640 - bigThree.addComponent(XYZPanel);1636 + //bigThree.addComponent(XYZPanel);1641 1637 1642 1638 // // SIDE EFFECT!!! 1643 1639 // aConstraints.gridx = 0; Object3D.java
.. .. @@ -3117,7 +3117,7 @@ 3117 3117 { 3118 3118 if (bRep != null) 3119 3119 { 3120 - bRep.GenerateNormalsMINE();3120 + bRep.MergeNormals(); //.GenerateNormalsMINE();3121 3121 Touch(); 3122 3122 } 3123 3123 } cFileSystemModel.java
.. .. @@ -118,7 +118,7 @@ 118 118 // Small icons 119 119 String valueTruncated = valueString.substring(0, valueString.length()-4); 120 120 121 - System.out.println(valueTruncated);121 + //System.out.println("valueTruncated = " + valueTruncated);122 122 123 123 javax.swing.ImageIcon rendererIcon = icons.get(valueTruncated); 124 124 icons/XYZ.pngBinary files differ
icons/XYZ100.pngBinary files differ
icons/XYZ70.pngBinary files differ
icons/info.pngBinary files differ
icons/material.gfdBinary files differ
icons/material.pngBinary files differ
icons/material600.pngBinary files differ
icons/material760.pngBinary files differ
icons/openwindow-200.pngBinary files differ
icons/openwindow.pngBinary files differ
icons/primitives.pngBinary files differ
icons/primitives512.pngBinary files differ