Permalink
Browse files

Working towards 6.1

  • Loading branch information...
Frederik Vanhoutte (W:Blut)
Frederik Vanhoutte (W:Blut) committed May 16, 2018
1 parent b0ba3aa commit 4d7c02a9775429c8f7c1872194b8a7aadd038f08
Showing with 10,621 additions and 10,435 deletions.
  1. +8 −2 README.md
  2. +24 −17 examples/geom/BSPtree/Ref_WB_BSPTree/Ref_WB_BSPTree.pde
  3. +4 −4 examples/geom/BSPtree/Ref_WB_BSPTree2DB/Ref_WB_BSPTree2DB.pde
  4. +2 −2 examples/geom/bounding/Ref_WB_AABBTree2D/Ref_WB_AABBTree2D.pde
  5. +15 −4 examples/geom/create/Ref_WB_BinaryGrid3D/Ref_WB_BinaryGrid3D.pde
  6. +1 −1 examples/geom/create/Ref_WB_Danzer3D/Ref_WB_Danzer3D.pde
  7. +20 −16 examples/hemesh/color/REF_ColorExport/REF_ColorExport.pde
  8. +1 −0 examples/hemesh/create/Ref_HEC_AlphaShape/Ref_HEC_AlphaShape.pde
  9. +36 −37 examples/hemesh/create/Ref_HEC_Cylinder/Ref_HEC_Cylinder.pde
  10. +23 −9 examples/hemesh/create/Ref_HEC_Disk/Ref_HEC_Disk.pde
  11. +2 −4 examples/hemesh/create/Ref_HEC_FromNetwork/Ref_HEC_FromNetwork.pde
  12. +1 −0 examples/hemesh/create/Ref_HEC_Geodesic/Ref_HEC_Geodesic.pde
  13. +47 −49 examples/hemesh/create/Ref_HEC_Grid/Ref_HEC_Grid.pde
  14. +8 −3 examples/hemesh/create/Ref_HEC_IsoSurfaceVOL2D/Ref_HEC_IsoSurfaceVOL2D.pde
  15. +1 −0 examples/hemesh/create/Ref_HEC_StepGrid/Ref_HEC_StepGrid.pde
  16. +1 −1 examples/hemesh/create/Ref_HEC_Zonohedron/Ref_HEC_Zonohedron.pde
  17. +6 −5 examples/hemesh/create/Ref_HEMC_VoronoiCellsPre/Ref_HEMC_VoronoiCellsPre.pde
  18. +3 −2 examples/hemesh/create/Ref_HEMC_VoronoiCellsPre_2/Ref_HEMC_VoronoiCellsPre_2.pde
  19. +3 −0 examples/hemesh/create/Ref_Mesh_Recording_With_HET_Recorder/Ref_Mesh_Recording_With_HET_Recorder.pde
  20. +2 −2 examples/hemesh/modify/Ref_HEM_Crocodile_Parameter/Ref_HEM_Crocodile_Parameter.pde
  21. +1 −1 examples/hemesh/modify/Ref_HEM_Diagrid/Ref_HEM_Diagrid.pde
  22. +3 −3 examples/hemesh/modify/Ref_HEM_Lattice_Parameter/Ref_HEM_Lattice_Parameter.pde
  23. +5 −5 examples/hemesh/modify/Ref_HEM_Slice/Ref_HEM_Slice.pde
  24. +4 −0 examples/hemesh/modify/Ref_HEM_VertexExpand/Ref_HEM_VertexExpand.pde
  25. +0 −2 examples/hemesh/modify/Ref_HEM_Wireframe/Ref_HEM_Wireframe.pde
  26. BIN external/hemesh-data-3_0_0.jar
  27. +1 −21 src/core/wblut/core/WB_Disclaimer.java
  28. +82 −196 src/core/wblut/core/WB_ProgressReporter.java
  29. +7 −59 src/core/wblut/core/WB_Version.java
  30. +48 −78 src/geom/wblut/geom/WB_AABBTree.java
  31. +6 −6 src/geom/wblut/geom/WB_BSPNode.java
  32. +6 −6 src/geom/wblut/geom/WB_BSPNode2D.java
  33. +121 −267 src/geom/wblut/geom/WB_BSPTree2D.java
  34. +80 −26 src/geom/wblut/geom/WB_BinaryGrid3D.java
  35. +49 −29 src/geom/wblut/geom/WB_Circle.java
  36. +93 −0 src/geom/wblut/geom/WB_CoordTransform2D.java
  37. +275 −261 src/geom/wblut/geom/WB_Earcut.java
  38. +1 −1 src/geom/wblut/geom/WB_GeometryFactory3D.java
  39. +14 −14 src/geom/wblut/geom/WB_GeometryOp3D.java
  40. +47 −17 src/geom/wblut/geom/WB_Hexagon.java
  41. +7 −8 src/geom/wblut/geom/WB_IndexedTriangle.java
  42. +39 −45 src/geom/wblut/geom/WB_Line.java
  43. +56 −18 src/geom/wblut/geom/WB_Octagon.java
  44. +43 −14 src/geom/wblut/geom/WB_Pentagon.java
  45. +67 −30 src/geom/wblut/geom/WB_Plane.java
  46. +177 −217 src/geom/wblut/geom/WB_Point.java
  47. +94 −50 src/geom/wblut/geom/WB_PolyLine.java
  48. +91 −49 src/geom/wblut/geom/WB_Polygon.java
  49. +31 −31 src/geom/wblut/geom/WB_PolygonSplitter.java
  50. +137 −100 src/geom/wblut/geom/WB_PolygonTriangulatorJTS.java
  51. +171 −189 src/geom/wblut/geom/WB_Polyhedron.java
  52. +46 −19 src/geom/wblut/geom/WB_Quad.java
  53. +32 −25 src/geom/wblut/geom/WB_Ray.java
  54. +78 −50 src/geom/wblut/geom/WB_Ring.java
  55. +48 −28 src/geom/wblut/geom/WB_Segment.java
  56. +40 −24 src/geom/wblut/geom/WB_Tetrahedron.java
  57. +107 −63 src/geom/wblut/geom/WB_Triangle.java
  58. +251 −299 src/geom/wblut/geom/WB_Vector.java
  59. +116 −120 src/geom/wblut/geom/WB_Vector2D.java
  60. +190 −165 src/geom/wblut/geom/WB_VoronoiCreator3D.java
  61. +27 −26 src/hemesh_core/wblut/hemesh/HEC_Creator.java
  62. +3 −3 src/hemesh_core/wblut/hemesh/HEM_Modifier.java
  63. +3 −3 src/hemesh_core/wblut/hemesh/HES_Simplifier.java
  64. +3 −3 src/hemesh_core/wblut/hemesh/HES_Subdividor.java
  65. +17 −23 src/hemesh_core/wblut/hemesh/HE_Element.java
  66. +123 −472 src/hemesh_core/wblut/hemesh/HE_Face.java
  67. +7 −12 src/hemesh_core/wblut/hemesh/HE_FaceSort.java
  68. +26 −382 src/hemesh_core/wblut/hemesh/HE_Halfedge.java
  69. +2 −31 src/hemesh_core/wblut/hemesh/HE_HalfedgeStructure.java
  70. +507 −1,197 src/hemesh_core/wblut/hemesh/HE_Mesh.java
  71. +21 −35 src/hemesh_core/wblut/hemesh/HE_MeshElement.java
  72. +1,668 −536 src/{hemesh_tools/wblut/hemesh/HET_MeshOp.java → hemesh_core/wblut/hemesh/HE_MeshOp.java}
  73. +16 −21 src/hemesh_core/wblut/hemesh/HE_Path.java
  74. +15 −22 src/hemesh_core/wblut/hemesh/HE_RAS.java
  75. +48 −123 src/hemesh_core/wblut/hemesh/HE_Selection.java
  76. +81 −441 src/hemesh_core/wblut/hemesh/HE_Vertex.java
  77. +1 −1 src/hemesh_creators/wblut/hemesh/HEC_Antiprism.java
  78. +3 −3 src/hemesh_creators/wblut/hemesh/HEC_Beethoven.java
  79. +61 −56 src/hemesh_creators/wblut/hemesh/HEC_Capsule.java
  80. +20 −17 src/hemesh_creators/wblut/hemesh/HEC_ConvexHull.java
  81. +47 −57 src/hemesh_creators/wblut/hemesh/HEC_Copy.java
  82. +25 −39 src/hemesh_creators/wblut/hemesh/HEC_Dual.java
  83. +76 −74 src/hemesh_creators/wblut/hemesh/HEC_FromFacelist.java
  84. +131 −87 src/hemesh_creators/wblut/hemesh/HEC_FromNetwork.java
  85. +4 −12 src/hemesh_creators/wblut/hemesh/HEC_FromPolyhedron.java
  86. +9 −14 src/hemesh_creators/wblut/hemesh/HEC_FromVoronoiCells.java
  87. +41 −26 src/hemesh_creators/wblut/hemesh/HEC_FromWBMesh.java
  88. +10 −12 src/hemesh_creators/wblut/hemesh/HEC_Geodesic.java
  89. +230 −233 src/hemesh_creators/wblut/hemesh/HEC_IsoSkin.java
  90. +230 −177 src/hemesh_creators/wblut/hemesh/HEC_IsoSurface.java
  91. +111 −123 src/hemesh_creators/wblut/hemesh/HEC_IsoSurfaceVOL2D.java
  92. +91 −28 src/hemesh_creators/wblut/hemesh/HEC_MiscPolyhedron.java
  93. +1 −1 src/hemesh_creators/wblut/hemesh/HEC_Prism.java
  94. +2 −8 src/hemesh_creators/wblut/hemesh/HEMC_Explode.java
  95. +6 −11 src/hemesh_creators/wblut/hemesh/HEMC_Panelizer.java
  96. +40 −62 src/hemesh_creators/wblut/hemesh/HEMC_VoronoiCells.java
  97. +42 −49 src/hemesh_creators/wblut/hemesh/HEMC_VoronoiCellsPre.java
  98. +2 −2 src/hemesh_creators/wblut/hemesh/HEMC_WeairePhelan.java
  99. +30 −19 src/hemesh_modifiers/wblut/hemesh/HEM_Bend.java
  100. +21 −22 src/hemesh_modifiers/wblut/hemesh/HEM_CapHoles.java
  101. +2 −2 src/hemesh_modifiers/wblut/hemesh/HEM_CenterSplit.java
  102. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_CenterSplitHole.java
  103. +13 −19 src/hemesh_modifiers/wblut/hemesh/HEM_ChamferCorners.java
  104. +18 −19 src/hemesh_modifiers/wblut/hemesh/HEM_ChamferEdges.java
  105. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_CircleInversion.java
  106. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Clean.java
  107. +29 −29 src/hemesh_modifiers/wblut/hemesh/HEM_Crocodile.java
  108. +9 −13 src/hemesh_modifiers/wblut/hemesh/HEM_Diagrid.java
  109. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_DoNothing.java
  110. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Dual.java
  111. +44 −43 src/hemesh_modifiers/wblut/hemesh/HEM_EqualizeValence.java
  112. +160 −148 src/hemesh_modifiers/wblut/hemesh/HEM_Extrude.java
  113. +25 −39 src/hemesh_modifiers/wblut/hemesh/HEM_FaceExpand.java
  114. +31 −58 src/hemesh_modifiers/wblut/hemesh/HEM_FacePlanarize.java
  115. +29 −35 src/hemesh_modifiers/wblut/hemesh/HEM_FlipFaces.java
  116. +6 −13 src/hemesh_modifiers/wblut/hemesh/HEM_HideEdges.java
  117. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_HybridSplit.java
  118. +18 −24 src/hemesh_modifiers/wblut/hemesh/HEM_Inflate.java
  119. +19 −30 src/hemesh_modifiers/wblut/hemesh/HEM_Kaleidoscope.java
  120. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_KeepLargestParts.java
  121. +118 −124 src/hemesh_modifiers/wblut/hemesh/HEM_Lattice.java
  122. +25 −36 src/hemesh_modifiers/wblut/hemesh/HEM_MeanCurvatureSmooth.java
  123. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_MidEdgeSplit.java
  124. +13 −34 src/hemesh_modifiers/wblut/hemesh/HEM_Mirror.java
  125. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_MultiSlice.java
  126. +11 −11 src/hemesh_modifiers/wblut/hemesh/HEM_MultiSliceSurface.java
  127. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Noise.java
  128. +16 −39 src/hemesh_modifiers/wblut/hemesh/HEM_PolyLineInversion.java
  129. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_PunchHoles.java
  130. +12 −16 src/hemesh_modifiers/wblut/hemesh/HEM_RadialNoise.java
  131. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_RemoveParts.java
  132. +17 −21 src/hemesh_modifiers/wblut/hemesh/HEM_Shell.java
  133. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Skew.java
  134. +23 −45 src/hemesh_modifiers/wblut/hemesh/HEM_Slice.java
  135. +89 −75 src/hemesh_modifiers/wblut/hemesh/HEM_SliceEdges.java
  136. +118 −116 src/hemesh_modifiers/wblut/hemesh/HEM_SliceSurface.java
  137. +23 −31 src/hemesh_modifiers/wblut/hemesh/HEM_Smooth.java
  138. +8 −8 src/hemesh_modifiers/wblut/hemesh/HEM_SmoothInset.java
  139. +21 −33 src/hemesh_modifiers/wblut/hemesh/HEM_Soapfilm.java
  140. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_SphericalInversion.java
  141. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Spherify.java
  142. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Stretch.java
  143. +27 −34 src/hemesh_modifiers/wblut/hemesh/HEM_TangentialSmooth.java
  144. +20 −33 src/hemesh_modifiers/wblut/hemesh/HEM_TaubinSmooth.java
  145. +2 −2 src/hemesh_modifiers/wblut/hemesh/HEM_Transform.java
  146. +15 −16 src/hemesh_modifiers/wblut/hemesh/HEM_TriSplit.java
  147. +3 −3 src/hemesh_modifiers/wblut/hemesh/HEM_TriangleInversion.java
  148. +14 −20 src/hemesh_modifiers/wblut/hemesh/HEM_Triangulate.java
  149. +31 −42 src/hemesh_modifiers/wblut/hemesh/HEM_TriangulateMT.java
  150. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Twist.java
  151. +7 −11 src/hemesh_modifiers/wblut/hemesh/HEM_VertexExpand.java
  152. +1 −1 src/hemesh_modifiers/wblut/hemesh/HEM_Wireframe.java
  153. +59 −57 src/hemesh_subdividors/wblut/hemesh/HES_CatmullClark.java
  154. +37 −31 src/hemesh_subdividors/wblut/hemesh/HES_DooSabin.java
  155. +73 −78 src/hemesh_subdividors/wblut/hemesh/HES_Planar.java
  156. +24 −35 src/hemesh_subdividors/wblut/hemesh/HES_PlanarMidEdge.java
  157. +33 −41 src/hemesh_subdividors/wblut/hemesh/HES_QuadSplit.java
  158. +25 −22 src/hemesh_subdividors/wblut/hemesh/HES_Smooth.java
  159. +72 −76 src/hemesh_subdividors/wblut/hemesh/HES_TriDec.java
  160. +66 −51 src/hemesh_subdividors/wblut/hemesh/HES_TriDecLimit.java
  161. +83 −47 src/hemesh_tools/wblut/hemesh/HET_Diagnosis.java
  162. +0 −618 src/hemesh_tools/wblut/hemesh/HET_Export.java
  163. +34 −57 src/hemesh_tools/wblut/hemesh/HET_FaceSplitter.java
  164. +230 −154 src/hemesh_tools/wblut/hemesh/HET_Fixer.java
  165. +34 −40 src/hemesh_tools/wblut/hemesh/HET_InfoFace.java
  166. +43 −33 src/hemesh_tools/wblut/hemesh/HET_Texture.java
  167. +1,139 −0 src/io/wblut/hemesh/HET_Export.java
  168. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_Import.java
  169. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterBinaryHemesh.java
  170. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterHemesh.java
  171. +76 −54 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterOBJ.java
  172. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterPLY.java
  173. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterPOV.java
  174. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterSTL.java
  175. 0 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterSimpleMesh.java
  176. +9 −9 src/{hemesh_tools → io}/wblut/hemesh/HET_WriterWRL.java
  177. +88 −62 src/processing/wblut/processing/WB_DebugRender3D.java
  178. +128 −91 src/processing/wblut/processing/WB_PShapeFactory.java
  179. +646 −467 src/processing/wblut/processing/WB_Render3D.java
  180. +3 −3 src/processing/wblut/processing/WB_SelectRender3D.java
@@ -16,9 +16,15 @@ You need to add some other external *.jar files to the properties of your Eclips
* `exp4j.jar`: A simple expression evaluator for Java. (https://github.com/fasseg/exp4j)
* `ParallelColt-0.9.4.jar` and dependecies: some functions use least-square approximations and other linear algebra approaches. (https://sites.google.com/site/piotrwendykier/software/parallelcolt)
## Build-of-the-day HE_Mesh (2017/12/19)
Download a recent built here: http://www.wblut.com/hemesh/hemesh20171219.zip.
## Current release
Download the current release here: http://www.wblut.com/hemesh/hemesh.zip.
## Build-of-the-day HE_Mesh (2018/05/16)
Download a recent built here: http://www.wblut.com/hemesh/hemesh20180516.zip.
## License
@@ -3,35 +3,42 @@ import wblut.processing.*;
import wblut.core.*;
import wblut.hemesh.*;
import wblut.geom.*;

HE_Mesh mesh;
import java.util.List;
HE_Mesh mesh, mesh2;
List<WB_Point> points;
WB_Render render;

WB_BSPTree tree;
void setup() {
size(1000,1000,P3D);
fullScreen(P3D);
smooth(8);
HEC_Dodecahedron creator=new HEC_Dodecahedron();
creator.setEdge(100);
//alternatively
//creator.setRadius(200);
//creator.setInnerRadius(200);// radius of sphere inscribed in cube
//creator.setOuterRadius(200);// radius of sphere circumscribing cube
//creator.setMidRadius(200);// radius of sphere tangential to edges
mesh=new HE_Mesh(creator);
HET_Diagnosis.validate(mesh);
render=new WB_Render(this);
mesh=new HE_Mesh(new HEC_Icosahedron().setRadius(200));
mesh.modify(new HEM_Crocodile().setDistance(200));
tree=new WB_BSPTree();
tree.build(mesh);
points=new ArrayList<WB_Point>();
WB_RandomPoint rp=new WB_RandomInSphere().setRadius(350);
for (int i=0; i<25000; i++) {
points.add(rp.nextPoint());
}
}

void draw() {
background(55);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
translate(width/2,height/2);
translate(width/2, height/2);
rotateY(mouseX*1.0f/width*TWO_PI);
rotateX(mouseY*1.0f/height*TWO_PI);
stroke(0);
render.drawEdges(mesh);

noStroke();
render.drawFaces(mesh);
for (WB_Point p : points) {
if (tree.pointLocation(p)>0) {
stroke(255, 0, 0);
render.drawPoint(p);
} else {
stroke(0, 255, 0);
render.drawPoint(p);
}
}
}
@@ -1,4 +1,3 @@
import wblut.*;
import wblut.processing.*;
import wblut.hemesh.*;
import wblut.geom.*;
@@ -29,7 +28,7 @@ void setup() {
}

void draw() {
background(0);
background(25);
translate(400, 400, 0);
pos= new ArrayList<WB_Polygon>();
neg= new ArrayList<WB_Polygon>();
@@ -39,13 +38,14 @@ void draw() {
tree.partitionPolygon(star, pos,neg);
strokeWeight(1.0);
stroke(255);
noFill();
if (tree.pointLocation(mouseX-400, mouseY-400)>0) fill(0, 255, 0,50); else fill(255,0, 0,50);
fill(255,50);
render.drawPolygonEdges(poly);
strokeWeight(4.0);
stroke(0, 255, 0);
fill(0,255,0,50);
render.drawPolygonEdges(pos);
stroke(255, 0, 0);
fill(255,0,0,50);
render.drawPolygonEdges(neg);

}
@@ -9,7 +9,7 @@ WB_Render3D render;
int[] tris;
WB_CoordCollection points;
WB_AABBTree2D tree;
WB_Danzer danzerC;
WB_Danzer2D danzerC;
void setup() {
size(1000, 1000, P3D);
smooth(8);
@@ -18,7 +18,7 @@ void setup() {
render=new WB_Render3D(this);
println(WB_Version.version());
println(WB_Disclaimer.disclaimer());
danzerC=new WB_Danzer(800.0, WB_Danzer.Type.C, new WB_Point(width/2, height/2));
danzerC=new WB_Danzer2D(800.0, WB_Danzer2D.Type.C, new WB_Point(width/2, height/2));
danzerC.inflate(3);
points=danzerC.getPoints();
tris=danzerC.getTriangles();
@@ -9,14 +9,19 @@ WB_Render render;
int sizeX, sizeY, sizeZ;
float dX,dY,dZ;
void setup() {
size(1000,1000,P3D);
fullScreen(P3D);
smooth(8);
sizeX=50;
dX=10.0;
sizeY=50;
dY=10.0;
sizeZ=50;
dZ=10.0;
create();
render=new WB_Render(this);
}

void create(){
grid=WB_BinaryGrid3D.createGrid(new WB_Point(),sizeX,dX,sizeY,dY,sizeZ,dZ);
for(int i=0;i<sizeX;i++){
for(int j=0;j<sizeY;j++){
@@ -25,18 +30,24 @@ void setup() {
}
}
}
render=new WB_Render(this);

}

void draw() {
background(55);
background(25);
translate(width/2, height/2);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
rotateY(mouseX*1.0f/width*TWO_PI);
rotateX(mouseY*1.0f/height*TWO_PI);
noStroke();
fill(55);
render.draw(grid);
stroke(0);
stroke(240);
render.drawOutline(grid);
}

void mousePressed(){
noiseSeed((long)random(1000000));
create();
}
@@ -36,7 +36,7 @@ void draw() {
lights();
translate(width/2, height/2, 0);
rotateY(map(mouseX,0,width,-PI,PI));
rotateX(map(mouseY,0,height,PI,-PI));
rotateX(map(mouseY,0,height,PI,-PI));
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
drawDanzer(danzerA);
@@ -9,13 +9,13 @@ WB_Render3D render;
void setup() {
size(1000, 1000, P3D);
smooth(8);
HEC_Dodecahedron creator=new HEC_Dodecahedron();
HEC_Dodecahedron creator=new HEC_Dodecahedron();
creator.setEdge(200);
mesh=new HE_Mesh(creator);
mesh.modify(new HEM_ChamferEdges().setDistance(50));
HET_MeshOp.splitFacesTri(mesh);
HET_MeshOp.splitFacesMidEdge(mesh);
HET_MeshOp.splitFacesMidEdge(mesh);
HEM_ChamferCorners cc=new HEM_ChamferCorners().setDistance(40);
mesh.modify(cc);
mesh.getSelection("chamfer").modify(new HEM_Crocodile().setDistance(150));
mesh.smooth();
mesh.triangulate();
HE_FaceIterator fitr=mesh.fItr();
colorMode(HSB);
@@ -29,24 +29,28 @@ mesh.modify(new HEM_ChamferEdges().setDistance(50));
vitr.next().setColor(color((int)random(4.0)*10, 255, 255));
}
colorMode(RGB);
HET_Export.saveToWRLWithFaceColor(mesh, sketchPath("meshes1"),"testfc");
HET_Export.saveToWRLWithVertexColor(mesh, sketchPath("meshes2"),"testvc");
HET_Export.saveToWRL(mesh, sketchPath("meshes3"),"test");
HET_Export.saveToPLY(mesh, sketchPath("meshes4"),"test");
HET_Export.saveToSTL(mesh, sketchPath("meshes5"),"test");
HET_Export.saveToOBJ(mesh, sketchPath("meshes6"),"test");
HET_Export.saveToOBJWithFaceColor(mesh, sketchPath("meshes7"),"testfc");
HET_Export.saveToOBJWithVertexColor(mesh, sketchPath("meshes8"),"testvc");
HET_Export.saveToPLYWithVertexColor(mesh, sketchPath("meshes9"),"testvc");
HET_Export.saveToPLYWithFaceColor(mesh,sketchPath("meshes10"),"testfc");
HET_Export.saveToWRL(mesh, sketchPath("WRL"), "testnc");
HET_Export.saveToWRLWithFaceColor(mesh, sketchPath("WRL"), "testfc");
HET_Export.saveToWRLWithVertexColor(mesh, sketchPath("WRL"), "testvc");

HET_Export.saveToPLY(mesh, sketchPath("PLY"), "testnc");
HET_Export.saveToPLYWithVertexColor(mesh, sketchPath("PLY"), "testvc");
HET_Export.saveToPLYWithFaceColor(mesh, sketchPath("PLY"), "testfc");

HET_Export.saveToOBJ(mesh, sketchPath("OBJ/nocolor"), "testnc");
HET_Export.saveToOBJWithVertexColor(mesh, sketchPath("OBJ/vertexcolor"), "testvc");
HET_Export.saveToOBJWithFaceColor(mesh, sketchPath("OBJ/facecolor"), "testfc");

HET_Export.saveToSTL(mesh, sketchPath("STL"), "testnc");

render=new WB_Render3D(this);
}

void draw() {
background(60);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
translate(width/2,height/2);
translate(width/2, height/2);
rotateY(mouseX*1.0f/width*TWO_PI);
rotateX(mouseY*1.0f/height*TWO_PI);
stroke(0);
@@ -37,6 +37,7 @@ void setup() {
triangles=triangulation.getAlphaTriangles(50.0);
mesh=new HE_Mesh(new HEC_AlphaShape().setTriangulation(triangulation).setAlpha(56.0));
mesh.smooth();
mesh.stats();
}


@@ -1,37 +1,36 @@
import wblut.math.*;
import wblut.processing.*;
import wblut.core.*;
import wblut.hemesh.*;
import wblut.geom.*;

HE_Mesh mesh;
WB_Render render;

void setup() {
size(1000,1000,P3D);
smooth(8);
HEC_Cylinder creator=new HEC_Cylinder();
creator.setRadius(150,50); // upper and lower radius. If one is 0, HEC_Cone is called.
creator.setHeight(400);
creator.setFacets(7).setSteps(5);
creator.setCap(true,true);// cap top, cap bottom?
//Default axis of the cylinder is (0,1,0). To change this use the HEC_Creator method setZAxis(..).
creator.setZAxis(0,1,1);
mesh=new HE_Mesh(creator);
HET_Diagnosis.validate(mesh);
render=new WB_Render(this);
}

void draw() {
background(55);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
translate(width/2,height/2);
rotateY(mouseX*1.0f/width*TWO_PI);
rotateX(mouseY*1.0f/height*TWO_PI);
stroke(0);
render.drawEdges(mesh);
noStroke();
render.drawFaces(mesh);
}

import wblut.math.*;
import wblut.processing.*;
import wblut.core.*;
import wblut.hemesh.*;
import wblut.geom.*;

HE_Mesh mesh;
WB_Render render;

void setup() {
size(1000,1000,P3D);
smooth(8);
HEC_Cylinder creator=new HEC_Cylinder();
creator.setRadius(70,150); // upper and lower radius. If one is 0, HEC_Cone is called.
creator.setHeight(400);
creator.setFacets(7).setSteps(5);
creator.setCap(true,true);// cap top, cap bottom?
//Default axis of the cylinder is (0,1,0). To change this use the HEC_Creator method setZAxis(..).
creator.setZAxis(0,1,1);
mesh=new HE_Mesh(creator);
HET_Diagnosis.validate(mesh);
render=new WB_Render(this);
}

void draw() {
background(55);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(127, 127, 127, -1, -1, 1);
translate(width/2,height/2);
rotateY(mouseX*1.0f/width*TWO_PI);
rotateX(mouseY*1.0f/height*TWO_PI);
stroke(0);
render.drawEdges(mesh);
noStroke();
render.drawFaces(mesh);
}
@@ -8,7 +8,7 @@ import wblut.processing.*;
WB_Render3D render;
WB_RandomPoint generator;
WB_Circle circle;
HE_Mesh mesh;
HE_Mesh mesh1,mesh2,mesh3;

void setup() {
size(1000, 1000, P3D);
@@ -19,9 +19,14 @@ void setup() {
println(WB_Version.version());
println(WB_Disclaimer.disclaimer());
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 300.0);
HEC_Disk dc=new HEC_Disk().setCircle(circle).setThickness(50.0);
mesh=new HE_Mesh(dc);

HEC_Disk dc=new HEC_Disk().setCircle(circle).setThickness(15.0);
mesh1=new HE_Mesh(dc);
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 200.0);
dc=new HEC_Disk().setCircle(circle).setThickness(30.0);
mesh2=new HE_Mesh(dc);
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 100.0);
dc=new HEC_Disk().setCircle(circle).setThickness(50.0);
mesh3=new HE_Mesh(dc);

}

@@ -36,18 +41,27 @@ void draw() {
stroke(255,0,0);
strokeWeight(1);
stroke(100,0,0);
render.drawEdges(mesh);
render.drawEdges(mesh1);
render.drawEdges(mesh2);
render.drawEdges(mesh3);
stroke(255,0,0);
render.drawGizmo(150);
render.drawPlane(circle.getPlane(),340.0);
noStroke();
fill(255);
render.drawFaces(mesh);
render.drawFaces(mesh1);
render.drawFaces(mesh2);
render.drawFaces(mesh3);

}

void mouseClicked(){
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 300.0);
HEC_Disk dc=new HEC_Disk().setCircle(circle).setThickness(50.0);
mesh=new HE_Mesh(dc);
HEC_Disk dc=new HEC_Disk().setCircle(circle).setThickness(15.0);
mesh1=new HE_Mesh(dc);
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 200.0);
dc=new HEC_Disk().setCircle(circle).setThickness(30.0);
mesh2=new HE_Mesh(dc);
circle=new WB_Circle(WB_Point.ORIGIN(),new WB_Vector(random(-1.0,1.0),random(-1.0,1.0),random(-1.0,1.0)), 100.0);
dc=new HEC_Disk().setCircle(circle).setThickness(50.0);
mesh3=new HE_Mesh(dc);
}
Oops, something went wrong.

0 comments on commit 4d7c02a

Please sign in to comment.