diff --git a/README.md b/README.md index dd1d0df..320bbc8 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,49 @@ # Unfolding Geometry Unfolding -##Qt Version +## Qt Version Qt 5.6.0 -##Supported Compiler +## Supported Compiler MinGW-x86-v4.9.2, MSVC++ 14.0(Visual Studio 2015) -##IDE & Project Files -###Qt Creator 3.6.1 +## IDE & Project Files +### Qt Creator 3.6.1 Open Unfolding.pro in root directory to edit and compile with Qt Creator IDE, all compiler supported. -###Visual Studio 2015 +### Visual Studio 2015 Open Unfolding.sln under directory _visual_studio_ to compile and edit with Visual Studio 2015, only MSVC++ 14.0 supported with with file. -##OpenGL Version +## OpenGL Version Minimum requirement: OpenGL 3.3 Core Profile + +## Branches +- master: contains Weaving operations. Uses vector storage as data structure @ShenyaoKe. +- conical_mesh: + - Oct Weaving, Weaving, Cross Weaving, Classical Weaving, Conical Weaving, BiTri Weaving operations @ShenyaoKe + - Revise on Conical Weaving, added refID for printing @urianawu + - Triangle Weaving operation @urianawu +- NewOrigami: attempt on single-panel origami unfolding scheme, only face bands are created @urianawu +- Origami: attempt on single-panel origami unfolding scheme @liz425 +- master3.0: + - contains GRS, GES, Half-Edge, Quad-Edge, Winged-Edge operations @urianawu, + - obj reader, hds data structure and unfolder originally implemented by @phg1024, + - obj reader and unfolder refactored and revised by @ShenyaoKe, + - printing and connectors generation by @ShenyaoKe +- dforms: an obsolete branch only @ShenyaoKe knows what it is + +## Unfolding workflow written by @ShenyaoKe + +1. Download the software in releases tab. +Latest Unfolding(contains Half-Edge, Quad-Edge, Winged-Edge) release: +Latest Woven release: + +2. Import your model from File->Import, or Click Import Button on Toolbar, or Press Ctrl+N on Keyboard; +3. Generate Developable Surface by Clicking the corresponding operation buttons; +4. For Unfolding: Adjust bridger size and flap size (from 0 to 0.98), adjust bridger sample in Set Connector option; For Woven: Adjust patch scale, strip width, layer offset(thickness of material). +5. Unfold current mesh by Clicking Unfold Mesh Button, or Press ALT+U on Keyboard; +6. Export as SVG file from File->Export, or Clicking Export Button on Toolbar, or Press Ctrl+E; +7. Adjust export settings, select path to save exported file, set scale to proper value to make enough space for holes, change pinhole size to exact size of your fasteners, change pinhole count and etch segments depending on your flap size and material rigidity. + +Note: +- You might come back to re-export SVG file if the result is not satisfying, especially in changing the scaling. +- Attention, our software will generate a file with "SVG" in filename. It's used for other purpose and is not the exported SVG file. + diff --git a/shaders/face_gs.glsl b/shaders/face_gs.glsl index e249e0d..85cfc4d 100644 --- a/shaders/face_gs.glsl +++ b/shaders/face_gs.glsl @@ -44,6 +44,8 @@ void EmitSide(vec4 p0, vec4 p1, vec4 n0, vec4 n1) void EmitBottom(vec4 p0, vec4 p1, vec4 p2) { + // If prefer backside as normal color, remove the comment here. + //normal = -normal; pos = p0.xyz - vNorm[0].xyz * thickness; gl_Position = proj_matrix * vec4(pos, 1.0f); EmitVertex(); diff --git a/src/MeshFactory/MeshNeoWeaver.cpp b/src/MeshFactory/MeshNeoWeaver.cpp index cd75802..02c3640 100644 --- a/src/MeshFactory/MeshNeoWeaver.cpp +++ b/src/MeshFactory/MeshNeoWeaver.cpp @@ -640,6 +640,7 @@ HDS_Mesh* MeshNeoWeaver::createClassicalWeaving(const mesh_t* ref_mesh, size_t refEdgeCount = refHeCount >> 1; size_t refFaceCount = ref_faces.size(); + mesh_t::resetIndex(); vector verts(refHeCount << 2); vector hes(refHeCount << 2); diff --git a/src/UI/MeshViewer.cpp b/src/UI/MeshViewer.cpp index c4b0482..32af70a 100644 --- a/src/UI/MeshViewer.cpp +++ b/src/UI/MeshViewer.cpp @@ -660,7 +660,7 @@ void MeshViewer::mouseMoveEvent(QMouseEvent* e) { if (dx != e->x() && dy != e->y()) { - view_cam.zoom(dx * 0.01, dy * 0.01, 0.0); + view_cam.zoom(-dx * 0.01, dy * 0.01, 0.0); update(); } }