├── .gitattributes ├── .qmake.stash ├── GLKLib ├── GLKCameraTool.h ├── GLKGLList.h ├── GLKGeometry.cpp ├── GLKGeometry.h ├── GLKGraph.cpp ├── GLKGraph.h ├── GLKHeap.cpp ├── GLKHeap.h ├── GLKLib.aps ├── GLKLib.cpp ├── GLKLib.h ├── GLKLib.pro ├── GLKLib.rc ├── GLKLib.vcxproj ├── GLKLib.vcxproj.filters ├── GLKLib.vcxproj.user ├── GLKMatrixLib.cpp ├── GLKMatrixLib.h ├── GLKNearestNeighbor.cpp ├── GLKNearestNeighbor.h ├── GLKObList.cpp ├── GLKObList.h ├── GLKRational.cpp ├── GLKRational.h ├── GLKSparseMatrix.cpp ├── GLKSparseMatrix.h ├── GLKSparseMatrixDirectSolver.cpp ├── GLKSparseMatrixDirectSolver.h ├── GLKSparseMatrixIterativeSolver.cpp ├── GLKSparseMatrixIterativeSolver.h ├── InteractiveTool.cpp ├── InteractiveTool.h ├── glu.h.txt ├── resource.h ├── stdafx.cpp ├── stdafx.h └── x64 │ ├── Debug │ └── qmake │ │ └── qtvars_x64_Debug.props │ └── Release │ ├── GLKGeometry.obj │ ├── GLKGraph.obj │ ├── GLKHeap.obj │ ├── GLKLib.Build.CppClean.log │ ├── GLKLib.log │ ├── GLKLib.obj │ ├── GLKLib.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── CustomBuild.command.1.tlog │ ├── CustomBuild.read.1.tlog │ ├── CustomBuild.write.1.tlog │ ├── GLKLib.lastbuildstate │ ├── GLKLib.write.1u.tlog │ ├── Lib-link.read.1.tlog │ ├── Lib-link.write.1.tlog │ ├── Lib.command.1.tlog │ ├── moc.read.1u.tlog │ └── moc.write.1u.tlog │ ├── GLKLib.vcxproj.FileListAbsolute.txt │ ├── GLKMatrixLib.obj │ ├── GLKNearestNeighbor.obj │ ├── GLKObList.obj │ ├── GLKRational.obj │ ├── GLKSparseMatrix.obj │ ├── GLKSparseMatrixDirectSolver.obj │ ├── GLKSparseMatrixIterativeSolver.obj │ ├── InteractiveTool.obj │ ├── moc_GLKLib.obj │ ├── qmake │ └── qtvars_x64_Release.props │ └── qt_work.log ├── LICENSE ├── QMeshLib ├── GeneratedFiles │ └── moc_predefs.h ├── PMBody.h ├── PolygenMesh.cpp ├── PolygenMesh.h ├── QMeshCluster.cpp ├── QMeshCluster.h ├── QMeshEdge.cpp ├── QMeshEdge.h ├── QMeshFace.cpp ├── QMeshFace.h ├── QMeshLib.pro ├── QMeshLib.vcxproj ├── QMeshLib.vcxproj.filters ├── QMeshLib.vcxproj.user ├── QMeshNode.cpp ├── QMeshNode.h ├── QMeshPatch.cpp ├── QMeshPatch.h ├── QMeshTetra.cpp ├── QMeshTetra.h ├── stdafx.cpp ├── stdafx.h └── x64 │ ├── Debug │ └── qmake │ │ └── qtvars_x64_Debug.props │ └── Release │ ├── BV.obj │ ├── Build.obj │ ├── PQP.obj │ ├── PolygenMesh.obj │ ├── QMeshCluster.obj │ ├── QMeshEdge.obj │ ├── QMeshFace.obj │ ├── QMeshLib.Build.CppClean.log │ ├── QMeshLib.log │ ├── QMeshLib.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── CustomBuild.command.1.tlog │ ├── CustomBuild.read.1.tlog │ ├── CustomBuild.write.1.tlog │ ├── Lib-link.read.1.tlog │ ├── Lib-link.write.1.tlog │ ├── Lib.command.1.tlog │ ├── QMeshLib.lastbuildstate │ └── unsuccessfulbuild │ ├── QMeshLib.vcxproj.FileListAbsolute.txt │ ├── QMeshNode.obj │ ├── QMeshPatch.obj │ ├── QMeshTetra.obj │ ├── TriDist.obj │ ├── geom.obj │ ├── geom2.obj │ ├── global.obj │ ├── io.obj │ ├── men.obj │ ├── merge.obj │ ├── poly.obj │ ├── poly2.obj │ ├── qconvex.obj │ ├── qhull.obj │ ├── qmake │ └── qtvars_x64_Release.props │ ├── qset.obj │ ├── rbox.obj │ ├── stat.obj │ └── user.obj ├── README.md ├── ShapeLab.pro ├── ShapeLab.sln ├── ShapeLab ├── GeneratedFiles │ ├── Debug │ │ └── moc_MainWindow.cpp │ ├── Release │ │ └── moc_MainWindow.cpp │ ├── qrc_ShapeLab.cpp │ └── ui_MainWindow.h ├── MainWindow.cpp ├── MainWindow.h ├── MainWindow.ui ├── ShapeLab.pro ├── ShapeLab.pro.bak ├── ShapeLab.qrc ├── ShapeLab.vcxproj ├── ShapeLab.vcxproj.filters ├── ShapeLab.vcxproj.user ├── SurfaceGuidanceField.cpp ├── SurfaceGuidanceField.h ├── alphanum.hpp ├── dirent.h ├── heatMethod.cpp ├── heatMethod.h ├── main.cpp ├── packages.config ├── resource │ ├── Back View.png │ ├── Bottom View.png │ ├── FaceNormal.png │ ├── Front View.png │ ├── InputSelection.png │ ├── Isometric View.png │ ├── Left View.png │ ├── Mesh.png │ ├── Node.png │ ├── NodeNormal.png │ ├── Open Folder.png │ ├── Profile.png │ ├── Right View.png │ ├── Save as.png │ ├── SaveSelection.png │ ├── Shade.png │ ├── Top View.png │ ├── Zoom All.png │ ├── Zoom In.png │ ├── Zoom Out.png │ ├── Zoom Window.png │ ├── abaqus logo.png │ ├── selectEdge.png │ ├── selectFace.png │ ├── selectFix.png │ ├── selectHandle.png │ └── selectNode.png ├── toolpathgeneration.cpp ├── toolpathgeneration.h └── x64 │ ├── Debug │ └── qmake │ │ └── qtvars_x64_Debug.props │ └── Release │ ├── DijkstraShortestPath.obj │ ├── GcodeGeneration.obj │ ├── MainWindow.obj │ ├── ShapeLab.Build.CppClean.log │ ├── ShapeLab.log │ ├── ShapeLab.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── CustomBuild.command.1.tlog │ ├── CustomBuild.read.1.tlog │ ├── CustomBuild.write.1.tlog │ ├── ShapeLab.lastbuildstate │ ├── ShapeLab.write.1u.tlog │ ├── link.command.1.tlog │ ├── link.read.1.tlog │ ├── link.write.1.tlog │ ├── moc.read.1u.tlog │ ├── moc.write.1u.tlog │ ├── rcc.read.1u.tlog │ ├── rcc.write.1u.tlog │ ├── uic.read.1u.tlog │ ├── uic.write.1u.tlog │ └── unsuccessfulbuild │ ├── ShapeLab.vcxproj.FileListAbsolute.txt │ ├── main.obj │ ├── qmake │ └── qtvars_x64_Release.props │ ├── qrc_ShapeLab.obj │ └── qt_work.log ├── ThirdPartyDependence ├── Eigen │ ├── CMakeLists.txt │ ├── Cholesky │ ├── CholmodSupport │ ├── Core │ ├── Dense │ ├── Eigen │ ├── Eigenvalues │ ├── Geometry │ ├── Householder │ ├── IterativeLinearSolvers │ ├── Jacobi │ ├── KLUSupport │ ├── LU │ ├── MetisSupport │ ├── OrderingMethods │ ├── PaStiXSupport │ ├── PardisoSupport │ ├── QR │ ├── QtAlignedMalloc │ ├── SPQRSupport │ ├── SVD │ ├── Sparse │ ├── SparseCholesky │ ├── SparseCore │ ├── SparseLU │ ├── SparseQR │ ├── StdDeque │ ├── StdList │ ├── StdVector │ ├── SuperLUSupport │ ├── UmfPackSupport │ └── src │ │ ├── Cholesky │ │ ├── LDLT.h │ │ ├── LLT.h │ │ └── LLT_LAPACKE.h │ │ ├── CholmodSupport │ │ └── CholmodSupport.h │ │ ├── Core │ │ ├── ArithmeticSequence.h │ │ ├── Array.h │ │ ├── ArrayBase.h │ │ ├── ArrayWrapper.h │ │ ├── Assign.h │ │ ├── AssignEvaluator.h │ │ ├── Assign_MKL.h │ │ ├── BandMatrix.h │ │ ├── Block.h │ │ ├── BooleanRedux.h │ │ ├── CommaInitializer.h │ │ ├── ConditionEstimator.h │ │ ├── CoreEvaluators.h │ │ ├── CoreIterators.h │ │ ├── CwiseBinaryOp.h │ │ ├── CwiseNullaryOp.h │ │ ├── CwiseTernaryOp.h │ │ ├── CwiseUnaryOp.h │ │ ├── CwiseUnaryView.h │ │ ├── DenseBase.h │ │ ├── DenseCoeffsBase.h │ │ ├── DenseStorage.h │ │ ├── Diagonal.h │ │ ├── DiagonalMatrix.h │ │ ├── DiagonalProduct.h │ │ ├── Dot.h │ │ ├── EigenBase.h │ │ ├── ForceAlignedAccess.h │ │ ├── Fuzzy.h │ │ ├── GeneralProduct.h │ │ ├── GenericPacketMath.h │ │ ├── GlobalFunctions.h │ │ ├── IO.h │ │ ├── IndexedView.h │ │ ├── Inverse.h │ │ ├── Map.h │ │ ├── MapBase.h │ │ ├── MathFunctions.h │ │ ├── MathFunctionsImpl.h │ │ ├── Matrix.h │ │ ├── MatrixBase.h │ │ ├── NestByValue.h │ │ ├── NoAlias.h │ │ ├── NumTraits.h │ │ ├── PermutationMatrix.h │ │ ├── PlainObjectBase.h │ │ ├── Product.h │ │ ├── ProductEvaluators.h │ │ ├── Random.h │ │ ├── Redux.h │ │ ├── Ref.h │ │ ├── Replicate.h │ │ ├── ReturnByValue.h │ │ ├── Reverse.h │ │ ├── Select.h │ │ ├── SelfAdjointView.h │ │ ├── SelfCwiseBinaryOp.h │ │ ├── Solve.h │ │ ├── SolveTriangular.h │ │ ├── SolverBase.h │ │ ├── StableNorm.h │ │ ├── Stride.h │ │ ├── Swap.h │ │ ├── Transpose.h │ │ ├── Transpositions.h │ │ ├── TriangularMatrix.h │ │ ├── VectorBlock.h │ │ ├── VectorwiseOp.h │ │ ├── Visitor.h │ │ ├── arch │ │ │ ├── AVX │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ └── TypeCasting.h │ │ │ ├── AVX512 │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ │ ├── AltiVec │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ │ ├── CUDA │ │ │ │ ├── Complex.h │ │ │ │ ├── Half.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ ├── PacketMathHalf.h │ │ │ │ └── TypeCasting.h │ │ │ ├── Default │ │ │ │ ├── ConjHelper.h │ │ │ │ └── Settings.h │ │ │ ├── NEON │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ │ ├── SSE │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── PacketMath.h │ │ │ │ └── TypeCasting.h │ │ │ └── ZVector │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ ├── functors │ │ │ ├── AssignmentFunctors.h │ │ │ ├── BinaryFunctors.h │ │ │ ├── NullaryFunctors.h │ │ │ ├── StlFunctors.h │ │ │ ├── TernaryFunctors.h │ │ │ └── UnaryFunctors.h │ │ ├── products │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ ├── GeneralMatrixMatrix.h │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h │ │ │ ├── GeneralMatrixMatrix_BLAS.h │ │ │ ├── GeneralMatrixVector.h │ │ │ ├── GeneralMatrixVector_BLAS.h │ │ │ ├── Parallelizer.h │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h │ │ │ ├── SelfadjointMatrixVector.h │ │ │ ├── SelfadjointMatrixVector_BLAS.h │ │ │ ├── SelfadjointProduct.h │ │ │ ├── SelfadjointRank2Update.h │ │ │ ├── TriangularMatrixMatrix.h │ │ │ ├── TriangularMatrixMatrix_BLAS.h │ │ │ ├── TriangularMatrixVector.h │ │ │ ├── TriangularMatrixVector_BLAS.h │ │ │ ├── TriangularSolverMatrix.h │ │ │ ├── TriangularSolverMatrix_BLAS.h │ │ │ └── TriangularSolverVector.h │ │ └── util │ │ │ ├── BlasUtil.h │ │ │ ├── Constants.h │ │ │ ├── DisableStupidWarnings.h │ │ │ ├── ForwardDeclarations.h │ │ │ ├── IndexedViewHelper.h │ │ │ ├── IntegralConstant.h │ │ │ ├── MKL_support.h │ │ │ ├── Macros.h │ │ │ ├── Memory.h │ │ │ ├── Meta.h │ │ │ ├── NonMPL2.h │ │ │ ├── ReenableStupidWarnings.h │ │ │ ├── StaticAssert.h │ │ │ ├── SymbolicIndex.h │ │ │ └── XprHelper.h │ │ ├── Eigenvalues │ │ ├── ComplexEigenSolver.h │ │ ├── ComplexSchur.h │ │ ├── ComplexSchur_LAPACKE.h │ │ ├── EigenSolver.h │ │ ├── GeneralizedEigenSolver.h │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ ├── HessenbergDecomposition.h │ │ ├── MatrixBaseEigenvalues.h │ │ ├── RealQZ.h │ │ ├── RealSchur.h │ │ ├── RealSchur_LAPACKE.h │ │ ├── SelfAdjointEigenSolver.h │ │ ├── SelfAdjointEigenSolver_LAPACKE.h │ │ └── Tridiagonalization.h │ │ ├── Geometry │ │ ├── AlignedBox.h │ │ ├── AngleAxis.h │ │ ├── EulerAngles.h │ │ ├── Homogeneous.h │ │ ├── Hyperplane.h │ │ ├── OrthoMethods.h │ │ ├── ParametrizedLine.h │ │ ├── Quaternion.h │ │ ├── Rotation2D.h │ │ ├── RotationBase.h │ │ ├── Scaling.h │ │ ├── Transform.h │ │ ├── Translation.h │ │ ├── Umeyama.h │ │ └── arch │ │ │ └── Geometry_SSE.h │ │ ├── Householder │ │ ├── BlockHouseholder.h │ │ ├── Householder.h │ │ └── HouseholderSequence.h │ │ ├── IterativeLinearSolvers │ │ ├── BasicPreconditioners.h │ │ ├── BiCGSTAB.h │ │ ├── ConjugateGradient.h │ │ ├── IncompleteCholesky.h │ │ ├── IncompleteLUT.h │ │ ├── IterativeSolverBase.h │ │ ├── LeastSquareConjugateGradient.h │ │ └── SolveWithGuess.h │ │ ├── Jacobi │ │ └── Jacobi.h │ │ ├── KLUSupport │ │ └── KLUSupport.h │ │ ├── LU │ │ ├── Determinant.h │ │ ├── FullPivLU.h │ │ ├── InverseImpl.h │ │ ├── PartialPivLU.h │ │ ├── PartialPivLU_LAPACKE.h │ │ └── arch │ │ │ └── Inverse_SSE.h │ │ ├── MetisSupport │ │ └── MetisSupport.h │ │ ├── OrderingMethods │ │ ├── Amd.h │ │ ├── Eigen_Colamd.h │ │ └── Ordering.h │ │ ├── PaStiXSupport │ │ └── PaStiXSupport.h │ │ ├── PardisoSupport │ │ └── PardisoSupport.h │ │ ├── QR │ │ ├── ColPivHouseholderQR.h │ │ ├── ColPivHouseholderQR_LAPACKE.h │ │ ├── CompleteOrthogonalDecomposition.h │ │ ├── FullPivHouseholderQR.h │ │ ├── HouseholderQR.h │ │ └── HouseholderQR_LAPACKE.h │ │ ├── SPQRSupport │ │ └── SuiteSparseQRSupport.h │ │ ├── SVD │ │ ├── BDCSVD.h │ │ ├── JacobiSVD.h │ │ ├── JacobiSVD_LAPACKE.h │ │ ├── SVDBase.h │ │ └── UpperBidiagonalization.h │ │ ├── SparseCholesky │ │ ├── SimplicialCholesky.h │ │ └── SimplicialCholesky_impl.h │ │ ├── SparseCore │ │ ├── AmbiVector.h │ │ ├── CompressedStorage.h │ │ ├── ConservativeSparseSparseProduct.h │ │ ├── MappedSparseMatrix.h │ │ ├── SparseAssign.h │ │ ├── SparseBlock.h │ │ ├── SparseColEtree.h │ │ ├── SparseCompressedBase.h │ │ ├── SparseCwiseBinaryOp.h │ │ ├── SparseCwiseUnaryOp.h │ │ ├── SparseDenseProduct.h │ │ ├── SparseDiagonalProduct.h │ │ ├── SparseDot.h │ │ ├── SparseFuzzy.h │ │ ├── SparseMap.h │ │ ├── SparseMatrix.h │ │ ├── SparseMatrixBase.h │ │ ├── SparsePermutation.h │ │ ├── SparseProduct.h │ │ ├── SparseRedux.h │ │ ├── SparseRef.h │ │ ├── SparseSelfAdjointView.h │ │ ├── SparseSolverBase.h │ │ ├── SparseSparseProductWithPruning.h │ │ ├── SparseTranspose.h │ │ ├── SparseTriangularView.h │ │ ├── SparseUtil.h │ │ ├── SparseVector.h │ │ ├── SparseView.h │ │ └── TriangularSolver.h │ │ ├── SparseLU │ │ ├── SparseLU.h │ │ ├── SparseLUImpl.h │ │ ├── SparseLU_Memory.h │ │ ├── SparseLU_Structs.h │ │ ├── SparseLU_SupernodalMatrix.h │ │ ├── SparseLU_Utils.h │ │ ├── SparseLU_column_bmod.h │ │ ├── SparseLU_column_dfs.h │ │ ├── SparseLU_copy_to_ucol.h │ │ ├── SparseLU_gemm_kernel.h │ │ ├── SparseLU_heap_relax_snode.h │ │ ├── SparseLU_kernel_bmod.h │ │ ├── SparseLU_panel_bmod.h │ │ ├── SparseLU_panel_dfs.h │ │ ├── SparseLU_pivotL.h │ │ ├── SparseLU_pruneL.h │ │ └── SparseLU_relax_snode.h │ │ ├── SparseQR │ │ └── SparseQR.h │ │ ├── StlSupport │ │ ├── StdDeque.h │ │ ├── StdList.h │ │ ├── StdVector.h │ │ └── details.h │ │ ├── SuperLUSupport │ │ └── SuperLUSupport.h │ │ ├── UmfPackSupport │ │ └── UmfPackSupport.h │ │ ├── misc │ │ ├── Image.h │ │ ├── Kernel.h │ │ ├── RealSvd2x2.h │ │ ├── blas.h │ │ ├── lapack.h │ │ ├── lapacke.h │ │ └── lapacke_mangling.h │ │ └── plugins │ │ ├── ArrayCwiseBinaryOps.h │ │ ├── ArrayCwiseUnaryOps.h │ │ ├── BlockMethods.h │ │ ├── CommonCwiseBinaryOps.h │ │ ├── CommonCwiseUnaryOps.h │ │ ├── IndexedViewMethods.h │ │ ├── MatrixCwiseBinaryOps.h │ │ └── MatrixCwiseUnaryOps.h ├── PQPLib │ ├── BV.cpp │ ├── BV.h │ ├── BVTQ.h │ ├── Build.cpp │ ├── Build.h │ ├── GetTime.h │ ├── MatVec.h │ ├── OBB_Disjoint.h │ ├── PQP.cpp │ ├── PQP.h │ ├── PQP_Compile.h │ ├── PQP_Internal.h │ ├── ReadMe.txt │ ├── RectDist.h │ ├── Tri.h │ ├── TriDist.cpp │ └── TriDist.h ├── QHullLib │ ├── Examples │ │ ├── qdelaun.cpp │ │ ├── qhalf.cpp │ │ ├── qvoronoi.cpp │ │ ├── unix.cpp │ │ ├── user_eg.cpp │ │ └── user_eg2.cpp │ ├── geom.cpp │ ├── geom.h │ ├── geom2.cpp │ ├── global.cpp │ ├── io.cpp │ ├── io.h │ ├── mem.h │ ├── men.cpp │ ├── merge.cpp │ ├── merge.h │ ├── poly.cpp │ ├── poly.h │ ├── poly2.cpp │ ├── qconvex.cpp │ ├── qhull.cpp │ ├── qhull.h │ ├── qhull_a.h │ ├── qset.cpp │ ├── qset.h │ ├── rbox.cpp │ ├── stat.cpp │ ├── stat.h │ ├── user.cpp │ └── user.h └── glut │ ├── GL.h │ ├── GLAux.h │ ├── GlAux.Lib │ ├── GlU32.Lib │ ├── OpenGL32.Lib │ ├── glew.h │ ├── glew32.dll │ ├── glew32.lib │ ├── glew32d.dll │ ├── glew32d.lib │ ├── glu.h │ ├── glut.def │ ├── glut.h │ ├── glut32.dll │ └── glut32.lib └── model ├── 7500.obj └── toolpathOutput └── waypoint.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.qmake.stash: -------------------------------------------------------------------------------- 1 | QMAKE_CXX.QT_COMPILER_STDCXX = 199711L 2 | QMAKE_CXX.QMAKE_MSC_VER = 1928 3 | QMAKE_CXX.QMAKE_MSC_FULL_VER = 192829334 4 | QMAKE_CXX.COMPILER_MACROS = \ 5 | QT_COMPILER_STDCXX \ 6 | QMAKE_MSC_VER \ 7 | QMAKE_MSC_FULL_VER 8 | QMAKE_CXX.INCDIRS = \ 9 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\ATLMFC\\include" \ 10 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\include" \ 11 | "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\ucrt" \ 12 | "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\shared" \ 13 | "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\um" \ 14 | "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\winrt" \ 15 | "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\cppwinrt" 16 | QMAKE_CXX.LIBDIRS = \ 17 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\ATLMFC\\lib\\x64" \ 18 | "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\lib\\x64" \ 19 | "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.18362.0\\ucrt\\x64" \ 20 | "C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.18362.0\\um\\x64" 21 | -------------------------------------------------------------------------------- /GLKLib/GLKGLList.h: -------------------------------------------------------------------------------- 1 | // GLKGLList.h: interface for the GLKGLList class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _GLKGLLIST 6 | #define _GLKGLLIST 7 | 8 | #include "GLKLib.h" 9 | #include "GLKObList.h" 10 | 11 | class GLKGLList : public GLKObject 12 | { 13 | public: 14 | GLKGLList() {}; 15 | virtual ~GLKGLList() {}; 16 | virtual void draw(GLKLib *view) {}; 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /GLKLib/GLKGraph.h: -------------------------------------------------------------------------------- 1 | // GLKGraph.h: interface for the GLKGraph class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #include "GLKObList.h" 6 | 7 | #ifndef _GLKGRAPHNODE 8 | #define _GLKGRAPHNODE 9 | 10 | class GLKGraphNode : public GLKObject 11 | { 12 | public: 13 | GLKGraphNode() {edgeList.RemoveAll();attachedObj=NULL;}; 14 | virtual ~GLKGraphNode() {}; 15 | void *attachedObj; 16 | GLKObList edgeList; 17 | 18 | //--------------------------------------------------------------- 19 | // the following variables are for minimum cut 20 | double m_excess; 21 | int m_height; 22 | GLKGraphNode *nextNode; 23 | }; 24 | 25 | #endif 26 | 27 | #ifndef _GLKGRAPHEDGE 28 | #define _GLKGRAPHEDGE 29 | 30 | class GLKGraphEdge : public GLKObject 31 | { 32 | public: 33 | GLKGraphEdge() {startNode=NULL; endNode=NULL; m_weight=0.0;}; 34 | virtual ~GLKGraphEdge() {}; 35 | 36 | GLKGraphNode* startNode; 37 | GLKGraphNode* endNode; 38 | double m_weight; 39 | void *attachedObj; 40 | 41 | //--------------------------------------------------------------- 42 | // the following variables are for minimum cut 43 | double m_flow; 44 | }; 45 | 46 | #endif 47 | 48 | #ifndef _GLKGRAPH 49 | #define _GLKGRAPH 50 | 51 | class GLKGraphCutNode; 52 | 53 | class GLKGraph 54 | { 55 | public: 56 | GLKGraph(); 57 | virtual ~GLKGraph(); 58 | 59 | void AddNode(GLKGraphNode *node); 60 | void AddEdge(GLKGraphEdge *edge); 61 | void FillInEdgeLinkersOnNodes(); 62 | 63 | void _Debug(); 64 | 65 | //--------------------------------------------------------------------- 66 | // The following function is implemented by the relabel-to-front algorithm 67 | public: 68 | double MinimumCut(GLKGraphNode *sourceNode, GLKGraphNode *targetNode, 69 | GLKObList *sourceRegionNodeList, GLKObList *targetRegionNodeList, 70 | bool bComputeMaxFlow=false); 71 | private: 72 | void _initializePreflow(GLKGraphNode *sourceNode); 73 | void _discharge(GLKGraphNode *uNode); 74 | void _push(GLKGraphNode *uNode, GLKGraphEdge *edge); 75 | void _relable(GLKGraphNode *uNode); 76 | void _partitionByResidualGraph(GLKGraphNode *sourceNode, GLKGraphNode *targetNode, 77 | GLKObList *sourceRegionNodeList, GLKObList *targetRegionNodeList); 78 | void _propagateInResidualGraph(GLKGraphNode *node, GLKObList *regionNodeList); 79 | double _computeMaxFlow(); 80 | 81 | private: 82 | void clearAll(); 83 | 84 | GLKObList nodeList; 85 | GLKObList edgeList; 86 | }; 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /GLKLib/GLKHeap.h: -------------------------------------------------------------------------------- 1 | // GLKHeap.h: interface for the GLKHeap class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _GLKHEAPNODE 6 | #define _GLKHEAPNODE 7 | 8 | #include "GLKObList.h" 9 | 10 | class GLKHeapNode : public GLKObject 11 | { 12 | public: 13 | GLKHeapNode() {index=0;}; 14 | virtual ~GLKHeapNode() {}; 15 | float GetValue() {return v;}; 16 | void SetValue(float value) {v=value;}; 17 | 18 | int index; // this is the index for locating HeapNode in a heap 19 | void* attachedObj; // who updates my weight 20 | 21 | protected: 22 | float v; // weight 23 | }; 24 | 25 | #endif 26 | 27 | 28 | #ifndef _GLKHEAP 29 | #define _GLKHEAP 30 | 31 | class GLKHeap 32 | { 33 | public: 34 | GLKHeap(int maxsize, bool minOrMax=true); // true - min Heap 35 | // false - max Heap 36 | GLKHeap(GLKHeapNode** arr, int n, bool minOrMax=true); 37 | virtual ~GLKHeap(); 38 | 39 | const GLKHeapNode* operator[] (int i); 40 | 41 | int ListSize(); 42 | bool ListEmpty(); 43 | bool ListFull(); 44 | 45 | void SetKetOnMinOrMax(bool flag); 46 | bool IsKeyOnMinOrMax(); // true - Keyed on min value 47 | // false - Keyed in max value 48 | 49 | bool Insert(GLKHeapNode* item); 50 | GLKHeapNode* RemoveTop(); 51 | GLKHeapNode* GetTop(); 52 | void AdjustPosition(GLKHeapNode* item); 53 | void Remove(GLKHeapNode* item); 54 | void ClearList(); 55 | 56 | private: 57 | bool bMinMax; // true - Keyed on min value 58 | // false - Keyed in max value 59 | 60 | // hlist points at the array which can be allocated by the constructor (inArray == 0) 61 | // or passed as a parameter (inArray == 1) 62 | GLKHeapNode** hlist; 63 | 64 | // amx elements allowed and current size of heap 65 | int maxheapsize; 66 | int heapsize; // identifies end of list 67 | 68 | // utility functions for Delete/Insert to restore heap 69 | void FilterDown(int i); 70 | void FilterUp(int i); 71 | 72 | void Expand(); 73 | }; 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /GLKLib/GLKLib.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/GLKLib.aps -------------------------------------------------------------------------------- /GLKLib/GLKLib.pro: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------- 2 | # This file is generated by the Qt Visual Studio Tools. 3 | # ------------------------------------------------------ 4 | 5 | TEMPLATE = lib 6 | TARGET = GLKLib 7 | QT += opengl 8 | QT += widgets 9 | DESTDIR = ./release 10 | CONFIG += staticlib debug 11 | DEFINES += _WINDOWS _UNICODE _ENABLE_EXTENDED_ALIGNED_STORAGE WIN64 _WINDOWS _UNICODE _ENABLE_EXTENDED_ALIGNED_STORAGE WIN64 12 | LIBS += -L"." 13 | DEPENDPATH += . 14 | MOC_DIR += . 15 | OBJECTS_DIR += release 16 | UI_DIR += ./GeneratedFiles 17 | RCC_DIR += ./GeneratedFiles 18 | win32:RC_FILE = GLKLib.rc 19 | HEADERS += ./GLKCameraTool.h \ 20 | ./GLKGLList.h \ 21 | ./GLKGeometry.h \ 22 | ./GLKGraph.h \ 23 | ./GLKHeap.h \ 24 | ./GLKMatrixLib.h \ 25 | ./GLKNearestNeighbor.h \ 26 | ./GLKObList.h \ 27 | ./GLKRational.h \ 28 | ./GLKSparseMatrix.h \ 29 | ./GLKSparseMatrixDirectSolver.h \ 30 | ./GLKSparseMatrixIterativeSolver.h \ 31 | ./InteractiveTool.h \ 32 | ./GLKLib.h\ 33 | ./stdafx.h 34 | SOURCES += ./GLKGeometry.cpp \ 35 | ./GLKGraph.cpp \ 36 | ./GLKHeap.cpp \ 37 | ./GLKLib.cpp \ 38 | ./GLKMatrixLib.cpp \ 39 | ./GLKNearestNeighbor.cpp \ 40 | ./GLKObList.cpp \ 41 | ./GLKRational.cpp \ 42 | ./GLKSparseMatrix.cpp \ 43 | ./GLKSparseMatrixDirectSolver.cpp \ 44 | ./GLKSparseMatrixIterativeSolver.cpp \ 45 | ./InteractiveTool.cpp\ 46 | ./stdafx.cpp 47 | 48 | INCLUDEPATH += $$PWD/../ThirdPartyDependence/glut 49 | INCLUDEPATH += $$PWD 50 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 51 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 52 | 53 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 54 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 55 | 56 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 57 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 58 | -------------------------------------------------------------------------------- /GLKLib/GLKLib.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/GLKLib.rc -------------------------------------------------------------------------------- /GLKLib/GLKLib.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 2021-11-18T10:36:48.9397819Z 6 | 7 | -------------------------------------------------------------------------------- /GLKLib/GLKNearestNeighbor.h: -------------------------------------------------------------------------------- 1 | // GLKNearestNeighbor.h: interface for the GLKNearestNeighbor class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _GLKNEAREST_NEIGHBOR 6 | #define _GLKNEAREST_NEIGHBOR 7 | 8 | #include "GLKObList.h" 9 | 10 | class GLKNearestNeighborNode : public GLKObject 11 | { 12 | public: 13 | float m_pos[3]; 14 | int m_index; 15 | GLKPOSITION m_PosInGLKObList; 16 | }; 17 | 18 | class GLKNearestNeighbor 19 | { 20 | public: 21 | GLKNearestNeighbor(int pntNum, float* xpos, float *ypos, float *zpos); 22 | GLKNearestNeighbor(int pntNum, float** pnts); 23 | virtual ~GLKNearestNeighbor(); 24 | 25 | void PntsInRange(float queryPnt[], float range, GLKArray* indexArray); 26 | void MovePnt(int pntIndex, float xNewPos, float yNewPos, float zNewPos); 27 | 28 | private: 29 | int m_xNum,m_yNum,m_zNum; 30 | float m_size,m_xmin,m_ymin,m_zmin,m_xmax,m_ymax,m_zmax; 31 | GLKObList ****m_grids; 32 | 33 | int m_pntNum; 34 | GLKNearestNeighborNode **m_nodeArray; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /GLKLib/GLKRational.h: -------------------------------------------------------------------------------- 1 | #ifndef _CCL_GLKRATIONAL 2 | #define _CCL_GLKRATIONAL 3 | 4 | #define TRUNC_EPS 1.0e-3 5 | 6 | class GLKRational 7 | { 8 | public: 9 | ~GLKRational(void); 10 | 11 | // Constructors 12 | GLKRational( int numerator = 0 ) 13 | : numer( numerator ), denom( 1 ) { }; 14 | GLKRational( int numerator, int denominator ) 15 | : numer( numerator ), denom( denominator ) { fixSigns( ); reduce( ); }; 16 | 17 | // Assignment Ops 18 | const GLKRational & operator=( const int value ); 19 | const GLKRational & operator=( const double value); 20 | const GLKRational & operator=( const GLKRational & rhs ); 21 | const GLKRational & operator+=( const GLKRational & rhs ); 22 | const GLKRational & operator-=( const GLKRational & rhs ); 23 | const GLKRational & operator/=( const GLKRational & rhs ); 24 | const GLKRational & operator*=( const GLKRational & rhs ); 25 | 26 | // Unary Operators 27 | const GLKRational & operator++( ); // Prefix 28 | GLKRational operator++( int ); // Postfix 29 | const GLKRational & operator--( ); // Prefix 30 | GLKRational operator--( int ); // Postfix 31 | const GLKRational & operator+( ) const; 32 | GLKRational operator-( ) const; 33 | bool operator!( ) const; 34 | 35 | // Named Member Functions 36 | double toDouble( ) const // Do the division 37 | { return static_cast( numer ) / denom; } 38 | int toInt( ) const // Do the division 39 | { return numer >= 0 ? numer / denom : - ( -numer / denom ); } 40 | bool isPositive( ) const 41 | { return numer > 0; } 42 | bool isNegative( ) const 43 | { return numer < 0; } 44 | bool isZero( ) const 45 | { return numer == 0; } 46 | 47 | private: 48 | // A rational number is represented by a numerator and 49 | // denominator in reduced form 50 | long numer; // The numerator 51 | long denom; // The denominator 52 | 53 | void fixSigns( ); // Ensures denom >= 0 54 | void reduce( ); // Ensures lowest form 55 | 56 | long gcd( long n, long m ); 57 | long gcd1( long n, long m ); 58 | }; 59 | 60 | // Math Binary Ops 61 | GLKRational operator+( const GLKRational & lhs, const GLKRational & rhs ); 62 | GLKRational operator-( const GLKRational & lhs, const GLKRational & rhs ); 63 | GLKRational operator/( const GLKRational & lhs, const GLKRational & rhs ); 64 | GLKRational operator*( const GLKRational & lhs, const GLKRational & rhs ); 65 | 66 | // Relational & Equality Ops 67 | bool operator< ( const GLKRational & lhs, const GLKRational & rhs ); 68 | bool operator<=( const GLKRational & lhs, const GLKRational & rhs ); 69 | bool operator> ( const GLKRational & lhs, const GLKRational & rhs ); 70 | bool operator>=( const GLKRational & lhs, const GLKRational & rhs ); 71 | bool operator==( const GLKRational & lhs, const GLKRational & rhs ); 72 | bool operator!=( const GLKRational & lhs, const GLKRational & rhs ); 73 | 74 | #endif -------------------------------------------------------------------------------- /GLKLib/GLKSparseMatrix.h: -------------------------------------------------------------------------------- 1 | // GLKSparseMatrix.h: interface for the GLKSparseMatrix class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _GLKSPARSEMATRIX 6 | #define _GLKSPARSEMATRIX 7 | 8 | #include "GLKObList.h" 9 | 10 | class GLKSparseMatrixNode 11 | { 12 | public: 13 | GLKSparseMatrixNode() {pNext=NULL;nColIndex=0;}; 14 | virtual ~GLKSparseMatrixNode() {}; 15 | 16 | GLKSparseMatrixNode *pNext; 17 | double data; unsigned long nColIndex; // index start from zero 18 | }; 19 | 20 | class GLKSparseMatrix 21 | { 22 | public: 23 | GLKSparseMatrix(); 24 | virtual ~GLKSparseMatrix(); 25 | 26 | void Initialization(unsigned long nRow, unsigned long nCol); 27 | 28 | void InputElement(unsigned long nRowIndex, unsigned long nColIndex, double data); 29 | void AddElement(unsigned long nRowIndex, unsigned long nColIndex, double delta); 30 | void InputComplete(bool bSort=true); // if the elements of each row are inserted by the 31 | // order of their nColIndex (ascending), 32 | // to reduce the computation time, we can set 33 | // "bSort=false" as the input parameter. 34 | void EliminateRow(unsigned long nRowIndex); 35 | 36 | void InputPermutationTable(unsigned long *permutations); // the number of element is the same as RowNumber 37 | void OutputPermutationTable(unsigned long *permutations); // the number of element is the same as RowNumber 38 | unsigned long * GetPermutationPointer() {return m_permutations;}; 39 | 40 | //----------------------------------------------------------------------------------------- 41 | // Elements are reordered by the Cuthill-McKee algorithm, where the result is 42 | // stored in the array - m_permutations[...] as the new index 43 | // Note that: this only works well when the pattern of the matrix is symmetric 44 | void ReOrderingByCuthillMcKeeAlgorithm(bool bSymmetricMatrix=true); 45 | 46 | GLKSparseMatrixNode** GetRowRoots() {return m_rowRoots;}; 47 | unsigned long GetRowNumber() {return m_nRow;}; 48 | unsigned long GetColNumber() {return m_nCol;}; 49 | 50 | unsigned long GetNonzeroElementNumber(); 51 | 52 | void DEBUG_OutputPattern(char *filename); 53 | 54 | private: 55 | void _clearAll(); 56 | void _quickSort(GLKSparseMatrixNode **nodeArray, long left, long right, long max); 57 | 58 | int _pseudoPeripheralNodeSearch(GLKSparseMatrixNode** colRoots=NULL); 59 | void _levelStructuring(int rootIndex, int &levelNum, int &newRootIndex, 60 | GLKSparseMatrixNode** colRoots=NULL); 61 | 62 | private: 63 | unsigned long m_nRow,m_nCol; 64 | GLKSparseMatrixNode** m_rowRoots; 65 | unsigned long *m_rowElementNum; 66 | unsigned long *m_permutations; // store the new index (re-ordered) of each element 67 | }; 68 | 69 | void Mul_A_b(GLKSparseMatrix *sparseMat, double *b, double *x); 70 | void Mul_At_b(GLKSparseMatrix *sparseMat, double *b, double *x); 71 | void Mul_At_A(GLKSparseMatrix *sparseMat, GLKSparseMatrix *&outputMat); 72 | void Mul_At_A1(GLKSparseMatrix *sparseMat, GLKSparseMatrix *&outputMat); 73 | void Mul_A_At(GLKSparseMatrix *sparseMat, GLKSparseMatrix *&transposeMat, GLKSparseMatrix *&outputMat); 74 | void Transpose(GLKSparseMatrix *sparseMat, GLKSparseMatrix *&outputMat); 75 | bool Mul_A_B(GLKSparseMatrix *matA, GLKSparseMatrix *matB, GLKSparseMatrix *&outputMat); 76 | void CopyMat(GLKSparseMatrix *sparseMat, GLKSparseMatrix *&outputMat); 77 | void PrintMat(GLKSparseMatrix *sparseMat); 78 | 79 | #endif 80 | -------------------------------------------------------------------------------- /GLKLib/GLKSparseMatrixDirectSolver.h: -------------------------------------------------------------------------------- 1 | // GLKSparseMatrixDirectSolver.h: interface for the GLKSparseMatrixDirectSolver class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _GLKSPARSEMATRIX_DIRECT_SOLVER 6 | #define _GLKSPARSEMATRIX_DIRECT_SOLVER 7 | 8 | class GLKSparseMatrix; 9 | 10 | class GLKSparseMatrixDirectSolver 11 | { 12 | public: 13 | GLKSparseMatrixDirectSolver(); 14 | virtual ~GLKSparseMatrixDirectSolver(); 15 | 16 | static bool BandGaussianElimination(GLKSparseMatrix *sparseMatrix, double *B); 17 | static bool BandGaussianElimination(GLKSparseMatrix *sparseMatrix, int colNum, double **B); 18 | 19 | private: 20 | static int aband(double* b, double* d, long n, long l, long il, long m); 21 | }; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /GLKLib/GLKSparseMatrixIterativeSolver.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/GLKSparseMatrixIterativeSolver.cpp -------------------------------------------------------------------------------- /GLKLib/InteractiveTool.h: -------------------------------------------------------------------------------- 1 | #ifndef INTERACTIVETOOL_H 2 | #define INTERACTIVETOOL_H 3 | 4 | #include "GLKLib.h" 5 | #include 6 | 7 | typedef enum select_type { NODE, EDGE, FACE, FIX, NHANDLE }; 8 | 9 | class InteractiveTool : public GLKMouseTool 10 | { 11 | public: 12 | InteractiveTool(GLKLib *pGLKLib, QMeshPatch *meshPatch_, GLKMouseTool *mouseTool, select_type selectType, bool Select); 13 | InteractiveTool(GLKLib *pGLKLib, GLKObList *polygenMeshList, GLKMouseTool *mouseTool, select_type selectType, bool Select); 14 | virtual ~InteractiveTool(); 15 | 16 | virtual int process_event(QEvent *event, mouse_event_type even_type); 17 | 18 | select_type getSelectedType() {return type;}; 19 | 20 | private: 21 | GLKLib *pGLK; 22 | QMeshPatch *meshPatch; 23 | GLKObList *polygenList; 24 | select_type type; 25 | GLKMouseTool *mouse_tool; 26 | 27 | QPoint lastPos; 28 | QPoint pos; 29 | 30 | bool isSelect = true; 31 | 32 | bool bAltPressed; 33 | bool bShiftPressed; 34 | 35 | void _selectNodes(QEvent *event, mouse_event_type event_type); 36 | void _selectEdges(QEvent *event, mouse_event_type event_type); 37 | void _selectFaces(QEvent *event, mouse_event_type event_type); 38 | void _selectFixed(QEvent *event, mouse_event_type event_type); 39 | void _selectHandle(QEvent *event, mouse_event_type event_type); 40 | 41 | 42 | void GetVisibleMesh(QMeshPatch *patch); 43 | }; 44 | 45 | //#include "GLKLib.h" 46 | 47 | //class QMeshPatch; 48 | //class QMeshNode; 49 | //class QMeshFace; 50 | //class InteractiveEntity; 51 | 52 | //typedef enum select_type {NODE, FACE, NODECLUSTER, FACECLUSTER}; 53 | 54 | //class InteractiveTool : public GLKMouseTool 55 | //{ 56 | //public: 57 | // InteractiveTool(GLKLib *pGLKLib, QMeshPatch *patch, GLKMouseTool *cameraTool, select_type selectType); 58 | // virtual ~InteractiveTool(); 59 | 60 | // virtual int process_event(QEvent *event, mouse_event_type event_type); 61 | 62 | // GLKLib *pGLK; 63 | // QMeshPatch *m_patch; 64 | 65 | //private: 66 | // GLKMouseTool *tool; 67 | // select_type type; 68 | 69 | // void _selectNode(QEvent *event, mouse_event_type event_type); 70 | // void _selectFace(QEvent *event, mouse_event_type event_type); 71 | 72 | // int m_totalNodeNum; 73 | // InteractiveEntity **m_node; 74 | // void _addNodeToDrawList(); 75 | // void _deleteNodeFromDrawList(); 76 | 77 | // QMeshFace* CalProjectedTrgl(double xx, double yy, double zz, 78 | // double nx, double ny, double nz, double& t,double& u,double& v,double& w); 79 | //}; 80 | 81 | #endif // INTERACTIVETOOL_H 82 | 83 | -------------------------------------------------------------------------------- /GLKLib/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by GLKLib.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /GLKLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MeshEntities.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /GLKLib/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER // Allow use of features specific to Windows XP or later. 11 | #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 15 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 16 | #endif 17 | 18 | #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. 19 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 20 | #endif 21 | 22 | #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 23 | #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. 24 | #endif 25 | 26 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 27 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CStringA constructors will be explicit 28 | 29 | #ifndef VC_EXTRALEAN 30 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 31 | #endif 32 | 33 | //#include 34 | //#include // MFC core and standard components 35 | 36 | 37 | 38 | // TODO: reference additional headers your program requires here 39 | #define CROSS(dest,v1,v2) \ 40 | dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \ 41 | dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \ 42 | dest[2]=v1[0]*v2[1]-v1[1]*v2[0]; 43 | #define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) 44 | -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKGeometry.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKGeometry.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKGraph.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKGraph.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKHeap.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKHeap.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.Build.CppClean.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.Build.CppClean.log -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CustomBuild.command.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\GLKLIB\RELEASE\MOC_PREDEFS.H.CBT 2 | cl -Bx"C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h 3 | -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CustomBuild.read.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\GLKLIB\RELEASE\MOC_PREDEFS.H.CBT 2 | C:\QT\QT5.12.3\5.12.3\MSVC2017_64\MKSPECS\FEATURES\DATA\DUMMY.CPP 3 | -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/CustomBuild.write.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\GLKLIB\RELEASE\MOC_PREDEFS.H.CBT 2 | D:\MANY_3DP_CNC_CAM\GLKLIB\RELEASE\MOC_PREDEFS.H 3 | -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/GLKLib.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.25.28610:TargetPlatformVersion=10.0.18362.0: 2 | Release|x64|D:\MANY_3DP_CNC_CAM\| 3 | -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/GLKLib.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/GLKLib.write.1u.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/Lib-link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/Lib-link.read.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/Lib-link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/Lib-link.write.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/Lib.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/Lib.command.1.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/moc.read.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/moc.read.1u.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.tlog/moc.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.tlog/moc.write.1u.tlog -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKLib.vcxproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKLib.vcxproj.FileListAbsolute.txt -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKMatrixLib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKMatrixLib.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKNearestNeighbor.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKNearestNeighbor.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKObList.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKObList.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKRational.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKRational.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKSparseMatrix.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKSparseMatrix.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKSparseMatrixDirectSolver.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKSparseMatrixDirectSolver.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/GLKSparseMatrixIterativeSolver.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/GLKSparseMatrixIterativeSolver.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/InteractiveTool.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/InteractiveTool.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/moc_GLKLib.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/moc_GLKLib.obj -------------------------------------------------------------------------------- /GLKLib/x64/Release/qt_work.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/GLKLib/x64/Release/qt_work.log -------------------------------------------------------------------------------- /QMeshLib/GeneratedFiles/moc_predefs.h: -------------------------------------------------------------------------------- 1 | #define _MSC_EXTENSIONS 2 | #define _MSC_VER 1930 3 | #define _MSC_FULL_VER 193030705 4 | #define _MSC_BUILD 0 5 | #define _M_AMD64 100 6 | #define _M_X64 100 7 | #define _WIN64 8 | #define _WIN32 9 | #define _CPPRTTI 10 | #define _MT 11 | #define _DLL 12 | -------------------------------------------------------------------------------- /QMeshLib/PolygenMesh.h: -------------------------------------------------------------------------------- 1 | #ifndef POLYGENMESH_H 2 | #define POLYGENMESH_H 3 | 4 | #include 5 | 6 | #include "../GLKLib/GLKLib.h" 7 | #include "../GLKLib/GLKObList.h" 8 | 9 | #include "../QMeshLib/QMeshTetra.h" 10 | #include "../QMeshLib/QMeshPatch.h" 11 | #include "../QMeshLib/QMeshFace.h" 12 | #include "../QMeshLib/QMeshEdge.h" 13 | #include "../QMeshLib/QMeshNode.h" 14 | 15 | typedef enum mesh_type { 16 | UNDEFINED, 17 | //for Nano Printing 18 | TET, 19 | CURVED_LAYER, 20 | Tool_PATH 21 | }; 22 | 23 | class PolygenMesh : public GLKEntity 24 | { 25 | public: 26 | 27 | PolygenMesh(mesh_type type); 28 | ~PolygenMesh(); 29 | 30 | mesh_type meshType; 31 | 32 | void ImportOBJFile(char *filename, std::string modelName); 33 | void ImportTETFile(char *filename, std::string modelName); 34 | 35 | virtual void DeleteGLList(); 36 | virtual void BuildGLList(bool bVertexNormalShading); 37 | 38 | virtual void drawShade(); 39 | virtual void drawMesh(); 40 | virtual void drawNode(); 41 | virtual void drawProfile(); 42 | virtual void drawFaceNormal(); 43 | virtual void drawNodeNormal(); 44 | virtual float getRange() {return m_range;} 45 | 46 | void drawBox(float xx, float yy, float zz, float r); 47 | 48 | void ClearAll(); 49 | void computeRange(); 50 | GLKObList &GetMeshList() {return meshList;}; 51 | void CompBoundingBox(double boundingBox[]); 52 | 53 | int m_materialTypeNum; 54 | bool m_bVertexNormalShading; 55 | 56 | public: 57 | GLKObList meshList; 58 | float m_range; 59 | int m_drawListID; 60 | int m_drawListNumber; 61 | 62 | void _buildDrawShadeList(bool bVertexNormalShading); 63 | void _buildDrawMeshList(); 64 | void _buildDrawNodeList(); 65 | void _buildDrawProfileList(); 66 | void _buildDrawFaceNormalList(); 67 | void _buildDrawNodeNormalList(); 68 | // void _buildDrawPreMeshList(); 69 | 70 | void drawSingleEdge(QMeshEdge* edge); 71 | void drawSingleNode(QMeshNode* node); 72 | void drawSingleFace(QMeshFace* face); 73 | void drawOriginalCoordinate(); 74 | 75 | void _changeValueToColor(int nType, float & nRed, float & nGreen, float & nBlue); 76 | void _changeValueToColor(double maxValue, double minValue, double Value, 77 | float & nRed, float & nGreen, float & nBlue); 78 | 79 | void setModelName(std::string name) {modelName=name;}; 80 | void setTransparent() {isTransparent=true;}; 81 | void setEdgeColor() {edgeColor=true;}; 82 | std::string getModelName() {return modelName;}; 83 | 84 | private: 85 | std::string modelName; 86 | bool isTransparent; 87 | bool edgeColor=false; 88 | }; 89 | 90 | #endif // POLYGENMESH_H 91 | -------------------------------------------------------------------------------- /QMeshLib/QMeshCluster.cpp: -------------------------------------------------------------------------------- 1 | #include "QMeshEdge.h" 2 | #include "QMeshCluster.h" 3 | 4 | QMeshCluster::QMeshCluster() 5 | { 6 | clusterFaceList.RemoveAll(); 7 | clusterNodeList.RemoveAll(); 8 | clusterEdgeList.RemoveAll(); 9 | clusterAnchorNodeList.RemoveAll(); 10 | clusterBndCurveList.RemoveAll(); 11 | centroidFace = nullptr; 12 | } 13 | 14 | QMeshCluster::~QMeshCluster() 15 | { 16 | clusterFaceList.RemoveAll(); 17 | clusterNodeList.RemoveAll(); 18 | clusterEdgeList.RemoveAll(); 19 | clusterAnchorNodeList.RemoveAll(); 20 | clusterBndCurveList.RemoveAll(); 21 | centroidFace = nullptr; 22 | } 23 | 24 | int QMeshCluster::GetIndexNo() 25 | { 26 | return indexno; 27 | } 28 | 29 | void QMeshCluster::SetIndexNo( const int _index ) 30 | { 31 | indexno = _index; 32 | } 33 | 34 | int QMeshCluster::GetClusterFaceNumber() 35 | { 36 | return clusterFaceList.GetCount(); 37 | } 38 | 39 | QMeshFace* QMeshCluster::GetClusterFaceRecordPtr(int No) //from 1 to n 40 | { 41 | if((No < 1)||(No>clusterFaceList.GetCount())) return nullptr; 42 | return (QMeshFace *)clusterFaceList.GetAt(clusterFaceList.FindIndex(No-1)); 43 | } 44 | 45 | GLKObList& QMeshCluster::GetClusterFaceList() 46 | { 47 | return clusterFaceList; 48 | } 49 | 50 | 51 | int QMeshCluster::GetClusterNodeNumber() 52 | { 53 | return clusterNodeList.GetCount(); 54 | } 55 | 56 | QMeshNode* QMeshCluster::GetClusterNodeRecordPtr(int No)//from 1 to n 57 | { 58 | if((No<1)||(No>clusterNodeList.GetCount())) return nullptr; 59 | return (QMeshNode *)clusterNodeList.GetAt(clusterNodeList.FindIndex(No-1)); 60 | } 61 | 62 | GLKObList& QMeshCluster::GetClusterNodeList() 63 | { 64 | return clusterNodeList; 65 | } 66 | 67 | int QMeshCluster::GetClusterEdgeNumber() 68 | { 69 | return clusterEdgeList.GetCount(); 70 | } 71 | 72 | QMeshEdge* QMeshCluster::GetClusterEdgeRecordPtr(int No)//from 1 to n 73 | { 74 | if( (No < 1) || (No > clusterEdgeList.GetCount())) return nullptr; 75 | return (QMeshEdge *)clusterEdgeList.GetAt(clusterEdgeList.FindIndex(No-1)); 76 | } 77 | 78 | GLKObList& QMeshCluster::GetClusterEdgeList() 79 | { 80 | return clusterEdgeList; 81 | } 82 | 83 | GLKObList& QMeshCluster::GetAnchorNodeList() 84 | { 85 | return clusterAnchorNodeList; 86 | } 87 | GLKObList& QMeshCluster::GetBndCurveList() 88 | { 89 | return clusterBndCurveList; 90 | } 91 | 92 | QMeshClusterBndCurve::QMeshClusterBndCurve() 93 | { 94 | m_leftCluster=nullptr; m_rightCluster=nullptr; attrEdge = nullptr; GlobalIndex = -1; 95 | m_edgeList=new GLKObList; m_edgeList->RemoveAll(); 96 | } 97 | 98 | QMeshClusterBndCurve::~QMeshClusterBndCurve() 99 | { 100 | delete m_edgeList; 101 | // if (attrEdge) 102 | // { 103 | // delete attrEdge; 104 | // attrEdge = NULL; 105 | // } 106 | } 107 | 108 | QMeshNode * QMeshClusterBndCurve::GetStartPoint() 109 | { 110 | return pStartPoint; 111 | } 112 | 113 | void QMeshClusterBndCurve::SetStartPoint( QMeshNode * _pStartPoint ) 114 | { 115 | pStartPoint = _pStartPoint; 116 | } 117 | 118 | QMeshNode * QMeshClusterBndCurve::GetEndPoint() 119 | { 120 | return pEndPoint; 121 | } 122 | 123 | void QMeshClusterBndCurve::SetEndPoint( QMeshNode * _pEndPoint ) 124 | { 125 | pEndPoint = _pEndPoint; 126 | } 127 | -------------------------------------------------------------------------------- /QMeshLib/QMeshCluster.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../GLKLib/GLKObList.h" 4 | 5 | class QMeshNode; 6 | class QMeshFace; 7 | class CCH_ATTRIB_EDGE; 8 | 9 | 10 | class QMeshCluster : public GLKObject 11 | { 12 | public: 13 | QMeshCluster(); 14 | virtual ~QMeshCluster(); 15 | 16 | public: 17 | 18 | int GetIndexNo(); //from 1 to n 19 | void SetIndexNo( const int _index = 1 ); 20 | 21 | int GetClusterFaceNumber(); 22 | int GetClusterNodeNumber(); 23 | int GetClusterEdgeNumber(); 24 | 25 | QMeshFace* GetClusterFaceRecordPtr(int No);//from 1 to n 26 | QMeshNode* GetClusterNodeRecordPtr(int No);//from 1 to n 27 | QMeshEdge* GetClusterEdgeRecordPtr(int No);//from 1 to n 28 | 29 | GLKObList& GetClusterFaceList(); 30 | GLKObList& GetClusterNodeList(); 31 | GLKObList& GetClusterEdgeList(); 32 | GLKObList& GetBndCurveList(); 33 | 34 | GLKObList& GetAnchorNodeList(); 35 | 36 | QMeshFace* centroidFace; 37 | 38 | private: 39 | int indexno; // start from 1 to n 40 | 41 | GLKObList clusterFaceList; // a list of cluster's faces 42 | GLKObList clusterNodeList; // a list of cluster's nodes 43 | GLKObList clusterEdgeList; // a list of cluster's Edges 44 | GLKObList clusterAnchorNodeList; //a list of cluster's Anchor Nodes 45 | GLKObList clusterBndCurveList; //a list of cluster's Boundary curves 46 | }; 47 | 48 | class QMeshClusterBndCurve : public GLKObject 49 | { 50 | public: 51 | QMeshClusterBndCurve(); 52 | virtual ~QMeshClusterBndCurve(); 53 | 54 | GLKObList *GetEdgeList() {return m_edgeList;}; 55 | 56 | void SetLeftCluster(QMeshCluster *cluster) {m_leftCluster=cluster;}; 57 | QMeshCluster *GetLeftCluster() {return m_leftCluster;}; 58 | void SetRightCluster(QMeshCluster *cluster) {m_rightCluster=cluster;}; 59 | QMeshCluster *GetRightCluster() {return m_rightCluster;}; 60 | void SetGlobalIndex(int _Index) {GlobalIndex = _Index;}; 61 | int GetGlobalIndex() {return GlobalIndex;}; 62 | 63 | QMeshNode * GetStartPoint(); 64 | void SetStartPoint(QMeshNode* _pStartPoint = nullptr ); 65 | 66 | QMeshNode * GetEndPoint(); 67 | void SetEndPoint(QMeshNode* _pEndPoint = nullptr ); 68 | 69 | CCH_ATTRIB_EDGE* attrEdge; 70 | private: 71 | int GlobalIndex; 72 | QMeshNode* pStartPoint, * pEndPoint; 73 | QMeshCluster* m_leftCluster, * m_rightCluster; 74 | GLKObList* m_edgeList; // Flag 4 of each edge is used here to indicate the direction of 75 | // this edge in this boundary curve 76 | }; 77 | -------------------------------------------------------------------------------- /QMeshLib/QMeshLib.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 2021-11-18T10:36:48.3562655Z 6 | 7 | -------------------------------------------------------------------------------- /QMeshLib/QMeshPatch.h: -------------------------------------------------------------------------------- 1 | // QMeshPatch.h: interface for the QMeshPatch class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #ifndef _QMESHPATCH 6 | #define _QMESHPATCH 7 | 8 | #include "../GLKLib/GLKObList.h" 9 | #include 10 | 11 | class QMeshTetra; 12 | class QMeshFace; 13 | class QMeshEdge; 14 | class QMeshNode; 15 | 16 | 17 | class QMeshPatch : public GLKObject 18 | { 19 | public: 20 | QMeshPatch(); 21 | virtual ~QMeshPatch(); 22 | 23 | public: 24 | void ClearAll(); 25 | 26 | bool GetAttribFlag( const int whichBit ); 27 | void SetAttribFlag( const int whichBit, const bool toBe = true ); 28 | 29 | int GetIndexNo(); //from 1 to n 30 | void SetIndexNo( const int _index = 1 ); 31 | 32 | int GetTetraNumber(); 33 | QMeshTetra* GetTetraRecordPtr(int No); //from 1 to n 34 | GLKObList& GetTetraList(); 35 | 36 | int GetFaceNumber(); 37 | QMeshFace* GetFaceRecordPtr(int No); //from 1 to n 38 | GLKObList& GetFaceList(); 39 | 40 | int GetEdgeNumber(); 41 | QMeshEdge* GetEdgeRecordPtr(int No); //from 1 to n 42 | GLKObList& GetEdgeList(); 43 | 44 | int GetNodeNumber(); 45 | QMeshNode* GetNodeRecordPtr(int No); //from 1 to n 46 | GLKObList& GetNodeList(); 47 | 48 | void SetMaterial(bool bDir, int material); 49 | int GetMaterial(bool bDir); 50 | 51 | bool inputOBJFile(char* filename, bool bOBTFile = false); 52 | bool inputTETFile(char* filename, bool bOBTFile = false); 53 | bool inputMFile(char* filename); 54 | bool inputPLY2File(char* filename); 55 | bool inputOFFFile(char* filename, bool bOBTFile = false); 56 | 57 | void outputOBJFile(char* filename, bool bOBTFile=false); 58 | void outputTrglOBJFile(char* filename); 59 | 60 | void InverseOrientation(); 61 | void ComputeBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax); 62 | void ComputeBoundingBox(double boundingBox[]); 63 | 64 | 65 | void constructionFromVerFaceTable(int nodeNum, float *nodeTable, int faceNum, unsigned int* faceTable); 66 | 67 | GLKObList& GetAttrib_EdgeList(); 68 | 69 | QMeshPatch *CopyMesh(); 70 | //for volume mesh 71 | bool isVolume; 72 | bool runTopOpt = false; 73 | // for NanoPrinting 74 | bool drawThisPatch = true; 75 | bool drawSingularity = false; 76 | std::string patchName = ""; 77 | bool isoSurfaceGuideFieldComputed = false; 78 | 79 | private: 80 | int indexno; // start from 1 to n 81 | 82 | bool flags[8]; // bit 0 -- TRUE for displaying the valence on nodes 83 | // FALSE for NOT displaying the valence on nodes 84 | // bit 1 -- TRUE for displaying the tensile energy on edges 85 | // FALSE for NOT displaying the tensile energy on edges 86 | // bit 2 -- TRUE for the 2D pattern has been determined 87 | // FALSE for the 2D pattern has NOT been determined 88 | 89 | 90 | GLKObList tetraList; // a list of mesh's tetras (QMeshTetra) 91 | GLKObList faceList; // a list of mesh's faces (QMeshFace) 92 | GLKObList edgeList; // a list of mesh's edges (QMeshEdge) 93 | GLKObList nodeList; // a list of mesh's nodes (QMeshNode) 94 | 95 | 96 | GLKObList Attrib_EdgeList; 97 | 98 | public: 99 | int isoNum; 100 | int boundNodeNum; 101 | bool isToolPathPatch; 102 | bool connectWithBoundary; 103 | 104 | }; 105 | 106 | #endif 107 | -------------------------------------------------------------------------------- /QMeshLib/QMeshTetra.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | ////// written by ToM, modified by Guoxin 3 | /////////////////////////////////////////////////////////////// 4 | #pragma once 5 | 6 | #ifndef DEF_TRGLTETRA 7 | #define DEF_TRGLTETRA 8 | 9 | #include "../GLKLib/GLKObList.h" 10 | 11 | class QMeshEdge; 12 | class QMeshPatch; 13 | class QMeshNode; 14 | class QMeshFace; 15 | 16 | class QMeshTetra : 17 | public GLKObject 18 | { 19 | public: 20 | QMeshTetra(void); 21 | ~QMeshTetra(void); 22 | 23 | // 1 24 | // /\ 25 | // e1/ |\e4 26 | // /e3| \ 27 | // /_e5___\ 28 | // 2 \ | / 4 29 | // e2 \|/ e6 30 | // 3 31 | // in anti-clockwise order 32 | // face1: 1,2,3 33 | // face2: 2,4,3 34 | // face3: 3,4,1 35 | // face4: 4,2,1 36 | 37 | 38 | bool selected; 39 | bool inner; //for cross section view 40 | int m_nIdentifiedPatchIndex; 41 | 42 | GLKPOSITION Pos; 43 | 44 | private: 45 | int indexno; 46 | QMeshPatch *meshSurface; // MESHSURFACE contain this triangle 47 | QMeshFace * faces[4]; // 4 faces 48 | bool isNormal[4]; // is normail direction 49 | 50 | double volume; 51 | 52 | GLKObList attachedList; 53 | //GLKObList nodeList; 54 | 55 | //BOOL flags[8]; 56 | 57 | public: 58 | int GetIndexNo(); //from 1 to n 59 | void SetIndexNo( const int _index = 1 ); 60 | 61 | void SetMeshSurfacePtr(QMeshPatch* _mesh); 62 | QMeshPatch* GetMeshSurfacePtr(); 63 | 64 | QMeshFace * GetFaceRecordPtr( const int whichFace ); 65 | //void SetFaceRecordPtr( const int whichFace, QMeshFace * _face = NULL); 66 | void SetFaceRecordPtr( const int whichFace, QMeshFace * _face); 67 | 68 | int GetFaceIndex(QMeshFace* face); 69 | 70 | QMeshEdge * GetEdgeRecordPtr( const int whichEdge ); 71 | int GetEdgeIndex(QMeshEdge* edge); 72 | 73 | bool IsFixed(); 74 | bool IsInner(); 75 | bool IsNormalDirection( const int whichFace ); 76 | void SetDirectionFlag( const int whichFace, const int toBe = true ); 77 | 78 | //BOOL GetAttribFlag( const int whichBit ); 79 | //void SetAttribFlag( const int whichBit, const BOOL toBe = TRUE ); 80 | 81 | GLKObList& GetAttachedList() {return attachedList;}; 82 | 83 | void CalCenterPos(double &xx, double &yy, double &zz); 84 | double CalVolume(double t[4][3]); 85 | double CalVolume(); 86 | double CalVolume_Last(); 87 | double GetVolume(); 88 | 89 | double CalSolidAngle(const int whichNode); 90 | double CalSolidAngle(double p[3][3], double pp[3]); 91 | 92 | bool CalTetraBarycentry(double p[3], double t[4][3], double &_p, double &_q, double &_r, double &_s); 93 | bool CalTetraBarycentry(double p[3], double &_p, double &_q, double &_r, double &_s); //find barycentry in this tetra 94 | 95 | void BarycentryToPosition(double _p, double _q, double _r, double _s, double t[4][3], double p[3]); 96 | void BarycentryToPosition(double _p, double _q, double _r, double _s, double p[3]); 97 | 98 | //void AddNode(QMeshNode *_node); 99 | //int GetNodeNumber(); 100 | QMeshNode* GetNodeRecordPtr(int whichNode); //from 1 to n 101 | //GLKObList& GetNodeList() { return nodeList; }; 102 | 103 | void GetNodePos(const int whichNode, double &xx, double &yy, double &zz); 104 | //QMeshNode * GetNodeRecordPtr(int whichNode); 105 | int GetNodeIndex(QMeshNode* node); 106 | 107 | int tet_node_index[4]; 108 | bool isChamber[4] = { false,false,false,false }; 109 | }; 110 | 111 | #endif -------------------------------------------------------------------------------- /QMeshLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MeshEntities.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /QMeshLib/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER // Allow use of features specific to Windows XP or later. 11 | #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 15 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 16 | #endif 17 | 18 | #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. 19 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 20 | #endif 21 | 22 | #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 23 | #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. 24 | #endif 25 | 26 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 27 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CStringA constructors will be explicit 28 | 29 | #ifndef VC_EXTRALEAN 30 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 31 | #endif 32 | 33 | //#include 34 | //#include // MFC core and standard components 35 | 36 | 37 | 38 | // TODO: reference additional headers your program requires here 39 | #define CROSS(dest,v1,v2) \ 40 | dest[0]=v1[1]*v2[2]-v1[2]*v2[1]; \ 41 | dest[1]=v1[2]*v2[0]-v1[0]*v2[2]; \ 42 | dest[2]=v1[0]*v2[1]-v1[1]*v2[0]; 43 | #define DOT(v1,v2) (v1[0]*v2[0]+v1[1]*v2[1]+v1[2]*v2[2]) 44 | -------------------------------------------------------------------------------- /QMeshLib/x64/Release/BV.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/BV.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/Build.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/Build.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/PQP.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/PQP.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/PolygenMesh.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/PolygenMesh.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshCluster.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshCluster.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshEdge.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshEdge.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshFace.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshFace.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.Build.CppClean.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.Build.CppClean.log -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CustomBuild.command.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\QMESHLIB\GENERATEDFILES\MOC_PREDEFS.H.CBT 2 | cl -Bx"C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >GeneratedFiles\moc_predefs.h 3 | -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CustomBuild.read.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\QMESHLIB\GENERATEDFILES\MOC_PREDEFS.H.CBT 2 | C:\QT\QT5.12.3\5.12.3\MSVC2017_64\MKSPECS\FEATURES\DATA\DUMMY.CPP 3 | -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/CustomBuild.write.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\QMESHLIB\GENERATEDFILES\MOC_PREDEFS.H.CBT 2 | D:\MANY_3DP_CNC_CAM\QMESHLIB\GENERATEDFILES\RELEASE\MOC_PREDEFS.H 3 | -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/Lib-link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/Lib-link.read.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/Lib-link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/Lib-link.write.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/Lib.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/Lib.command.1.tlog -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/QMeshLib.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.25.28610:TargetPlatformVersion=10.0.18362.0: 2 | Release|x64|D:\MANY_3DP_CNC_CAM\| 3 | -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshLib.vcxproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshLib.vcxproj.FileListAbsolute.txt -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshNode.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshNode.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshPatch.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshPatch.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/QMeshTetra.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/QMeshTetra.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/TriDist.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/TriDist.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/geom.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/geom.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/geom2.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/geom2.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/global.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/global.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/io.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/io.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/men.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/men.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/merge.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/merge.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/poly.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/poly.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/poly2.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/poly2.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/qconvex.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/qconvex.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/qhull.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/qhull.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/qset.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/qset.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/rbox.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/rbox.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/stat.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/stat.obj -------------------------------------------------------------------------------- /QMeshLib/x64/Release/user.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/QMeshLib/x64/Release/user.obj -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CurvedLayerToolpathGenerator 2 | generate hybird toolpath (zigzag + boundary parallel) on curved printing layer 3 | -------------------------------------------------------------------------------- /ShapeLab.pro: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------- 2 | # This file is generated by the Qt Visual Studio Tools. 3 | # ------------------------------------------------------ 4 | 5 | # This is a reminder that you are using a generated .pro file. 6 | # Remove it when you are finished editing this file. 7 | message("You are running qmake on a generated .pro file. This may not work!") 8 | 9 | 10 | TEMPLATE = subdirs 11 | SUBDIRS += QMeshLib/QMeshLib.pro \ 12 | GLKLib/GLKLib.pro \ 13 | ShapeLab/ShapeLab.pro 14 | 15 | QMAKE_CXXFLAGS+= -openmp 16 | -------------------------------------------------------------------------------- /ShapeLab.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.0.31912.275 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QMeshLib", "QMeshLib\QMeshLib.vcxproj", "{1B926E57-61E1-32F2-9864-69C4856A16BE}" 6 | EndProject 7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLKLib", "GLKLib\GLKLib.vcxproj", "{7F4B2115-209A-32C6-8AB6-517D70FBCA77}" 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShapeLab", "ShapeLab\ShapeLab.vcxproj", "{7DB27B48-C018-3FD8-B3D6-337D43F838FB}" 10 | ProjectSection(ProjectDependencies) = postProject 11 | {1B926E57-61E1-32F2-9864-69C4856A16BE} = {1B926E57-61E1-32F2-9864-69C4856A16BE} 12 | {7F4B2115-209A-32C6-8AB6-517D70FBCA77} = {7F4B2115-209A-32C6-8AB6-517D70FBCA77} 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|x64 = Debug|x64 18 | Release|x64 = Release|x64 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {1B926E57-61E1-32F2-9864-69C4856A16BE}.Debug|x64.ActiveCfg = Debug|x64 22 | {1B926E57-61E1-32F2-9864-69C4856A16BE}.Debug|x64.Build.0 = Debug|x64 23 | {1B926E57-61E1-32F2-9864-69C4856A16BE}.Release|x64.ActiveCfg = Release|x64 24 | {1B926E57-61E1-32F2-9864-69C4856A16BE}.Release|x64.Build.0 = Release|x64 25 | {7F4B2115-209A-32C6-8AB6-517D70FBCA77}.Debug|x64.ActiveCfg = Debug|x64 26 | {7F4B2115-209A-32C6-8AB6-517D70FBCA77}.Debug|x64.Build.0 = Debug|x64 27 | {7F4B2115-209A-32C6-8AB6-517D70FBCA77}.Release|x64.ActiveCfg = Release|x64 28 | {7F4B2115-209A-32C6-8AB6-517D70FBCA77}.Release|x64.Build.0 = Release|x64 29 | {7DB27B48-C018-3FD8-B3D6-337D43F838FB}.Debug|x64.ActiveCfg = Debug|x64 30 | {7DB27B48-C018-3FD8-B3D6-337D43F838FB}.Debug|x64.Build.0 = Debug|x64 31 | {7DB27B48-C018-3FD8-B3D6-337D43F838FB}.Release|x64.ActiveCfg = Release|x64 32 | {7DB27B48-C018-3FD8-B3D6-337D43F838FB}.Release|x64.Build.0 = Release|x64 33 | EndGlobalSection 34 | GlobalSection(SolutionProperties) = preSolution 35 | HideSolutionNode = FALSE 36 | EndGlobalSection 37 | GlobalSection(ExtensibilityGlobals) = postSolution 38 | Qt5Version = msvc2017_64 39 | SolutionGuid = {CF8B4A8D-82A4-42A5-A4E6-2A26752AA215} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /ShapeLab/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "../GLKLib/GLKLib.h" 8 | #include "../QMeshLib/PolygenMesh.h" 9 | #include 10 | #include 11 | #include 12 | 13 | #include "SurfaceGuidanceField.h" 14 | #include "toolpathgeneration.h" 15 | #include "heatMethod.h" 16 | 17 | #define PI 3.141592654 18 | #define DEGREE_TO_ROTATE(x) 0.0174532922222*x 19 | #define ROTATE_TO_DEGREE(x) 57.295780490443*x 20 | 21 | using namespace std; 22 | 23 | class DeformTet; 24 | 25 | namespace Ui { 26 | class MainWindow; 27 | } 28 | 29 | class MainWindow : public QMainWindow 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | explicit MainWindow(QWidget *parent = 0); 35 | ~MainWindow(); 36 | 37 | public slots: 38 | // Qtimer - defined function 39 | //void doTimerGcodeMoving(); 40 | 41 | private: 42 | Ui::MainWindow *ui; 43 | GLKLib *pGLK; 44 | 45 | /* add for Gcode generation */ 46 | //QTimer Gcode_timer; //Gcode Simulation timer 47 | //int gocodetimerItertime; 48 | //int simuLayerInd; 49 | //Eigen::MatrixXf Gcode_Table; 50 | //unsigned int operationTime = 0; 51 | /* ------------------------ */ 52 | GLKObList polygenMeshList; 53 | 54 | private: 55 | void createActions(); 56 | void createTreeView(); 57 | void showTetraDeformationRatio(); 58 | void MoveHandleRegion(); 59 | void QTgetscreenshoot(); 60 | 61 | PolygenMesh *getSelectedPolygenMesh(); 62 | 63 | QSignalMapper *signalMapper; 64 | QStandardItemModel *treeModel; 65 | 66 | DeformTet *Deformation; 67 | 68 | private:// functions for Nano Printing. 69 | 70 | 71 | protected: 72 | void dragEnterEvent(QDragEnterEvent *event); 73 | void dropEvent(QDropEvent *event); 74 | 75 | private slots: 76 | void open(); 77 | void save(); 78 | void saveSelection(); 79 | void readSelection(); 80 | 81 | void signalNavigation(int flag); 82 | void shiftToOrigin(); 83 | void updateTree(); 84 | void mouseMoveEvent(QMouseEvent *event); 85 | void on_pushButton_clearAll_clicked(); 86 | void on_treeView_clicked(const QModelIndex &index); 87 | 88 | private slots: 89 | void runToolpathGeneration(); 90 | void toolpath_computeParameter(toolPathGeneration* layerToolPathComp, 91 | int& boundaryNum, int& zigzagTPathNum, int& boundaryTPathNum, 92 | double& shrinkOffset, double& boundaryTPathOffset); 93 | void outputToolpathWaypoints(); 94 | 95 | }; 96 | 97 | #endif // MAINWINDOW_H 98 | -------------------------------------------------------------------------------- /ShapeLab/ShapeLab.pro: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------- 2 | # This file is generated by the Qt Visual Studio Tools. 3 | # ------------------------------------------------------ 4 | 5 | TEMPLATE = app 6 | TARGET = ShapeLab 7 | QT += opengl 8 | QT += widgets 9 | QT += core gui opengl 10 | 11 | OBJECTS_DIR += release 12 | UI_DIR += ./GeneratedFiles 13 | 14 | 15 | INCLUDEPATH += $$PWD/../ThirdPartyDependence/eigen3 16 | INCLUDEPATH += $$PWD/../ThirdPartyDependence 17 | 18 | HEADERS += *.h 19 | 20 | #ui_MainWindow not included. 21 | SOURCES += *.cpp 22 | 23 | 24 | FORMS += ./MainWindow.ui 25 | RESOURCES += ShapeLab.qrc 26 | 27 | 28 | #open gl lib 29 | INCLUDEPATH += $$PWD/../ThirdPartyDependence/glut 30 | 31 | 32 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 33 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 34 | 35 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 36 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 37 | 38 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 39 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 40 | 41 | 42 | 43 | #QMeshLib 44 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../QMeshLib/release/ -lQMeshLib 45 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../QMeshLib/debug/ -lQMeshLib 46 | else:unix: LIBS += -L$$OUT_PWD/../QMeshLib/ -lQMeshLib 47 | 48 | INCLUDEPATH += $$PWD/../QMeshLib 49 | DEPENDPATH += $$PWD/../QMeshLib 50 | 51 | win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/release/libQMeshLib.a 52 | else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/debug/libQMeshLib.a 53 | else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/release/QMeshLib.lib 54 | else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/debug/QMeshLib.lib 55 | else:unix: PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/libQMeshLib.a 56 | 57 | #GLK lib and pre-target. 58 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../GLKLib/release/ -lGLKLib 59 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../GLKLib/debug/ -lGLKLib 60 | else:unix: LIBS += -L$$OUT_PWD/../GLKLib/ -lGLKLib 61 | 62 | INCLUDEPATH += $$PWD/../GLKLib 63 | DEPENDPATH += $$PWD/../GLKLib 64 | 65 | win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/release/libGLKLib.a 66 | else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/debug/libGLKLib.a 67 | else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/release/GLKLib.lib 68 | else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/debug/GLKLib.lib 69 | else:unix: PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/libGLKLib.a 70 | -------------------------------------------------------------------------------- /ShapeLab/ShapeLab.pro.bak: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------- 2 | # This file is generated by the Qt Visual Studio Tools. 3 | # ------------------------------------------------------ 4 | 5 | TEMPLATE = app 6 | TARGET = ShapeLab 7 | QT += opengl 8 | QT += widgets 9 | QT += core gui opengl 10 | 11 | OBJECTS_DIR += release 12 | UI_DIR += ./GeneratedFiles 13 | 14 | 15 | INCLUDEPATH += $$PWD/../ThirdPartyDependence/eigen3 16 | INCLUDEPATH += $$PWD/../ThirdPartyDependence 17 | 18 | HEADERS +=*.h 19 | 20 | #ui_MainWindow not included. 21 | SOURCES += *.cpp 22 | 23 | 24 | FORMS += ./MainWindow.ui 25 | RESOURCES += ShapeLab.qrc 26 | 27 | 28 | #open gl lib 29 | INCLUDEPATH += $$PWD/../ThirdPartyDependence/glut 30 | 31 | 32 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 33 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lglut32 34 | 35 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 36 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lOpenGL32 37 | 38 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 39 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../ThirdPartyDependence/glut -lGlU32 40 | 41 | 42 | 43 | #QMeshLib 44 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../QMeshLib/release/ -lQMeshLib 45 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../QMeshLib/debug/ -lQMeshLib 46 | else:unix: LIBS += -L$$OUT_PWD/../QMeshLib/ -lQMeshLib 47 | 48 | INCLUDEPATH += $$PWD/../QMeshLib 49 | DEPENDPATH += $$PWD/../QMeshLib 50 | 51 | win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/release/libQMeshLib.a 52 | else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/debug/libQMeshLib.a 53 | else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/release/QMeshLib.lib 54 | else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/debug/QMeshLib.lib 55 | else:unix: PRE_TARGETDEPS += $$OUT_PWD/../QMeshLib/libQMeshLib.a 56 | 57 | #GLK lib and pre-target. 58 | win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../GLKLib/release/ -lGLKLib 59 | else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../GLKLib/debug/ -lGLKLib 60 | else:unix: LIBS += -L$$OUT_PWD/../GLKLib/ -lGLKLib 61 | 62 | INCLUDEPATH += $$PWD/../GLKLib 63 | DEPENDPATH += $$PWD/../GLKLib 64 | 65 | win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/release/libGLKLib.a 66 | else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/debug/libGLKLib.a 67 | else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/release/GLKLib.lib 68 | else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/debug/GLKLib.lib 69 | else:unix: PRE_TARGETDEPS += $$OUT_PWD/../GLKLib/libGLKLib.a 70 | -------------------------------------------------------------------------------- /ShapeLab/ShapeLab.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/InputSelection.png 4 | resource/SaveSelection.png 5 | resource/selectHandle.png 6 | resource/Open Folder.png 7 | resource/selectFix.png 8 | resource/Back View.png 9 | resource/Bottom View.png 10 | resource/Front View.png 11 | resource/abaqus logo.png 12 | resource/Left View.png 13 | resource/Right View.png 14 | resource/Top View.png 15 | resource/Isometric View.png 16 | resource/Zoom All.png 17 | resource/Zoom In.png 18 | resource/Zoom Out.png 19 | resource/Zoom Window.png 20 | resource/Shade.png 21 | resource/Mesh.png 22 | resource/Node.png 23 | resource/Save as.png 24 | resource/selectNode.png 25 | resource/selectFace.png 26 | resource/Profile.png 27 | resource/FaceNormal.png 28 | resource/NodeNormal.png 29 | resource/selectEdge.png 30 | 31 | 32 | -------------------------------------------------------------------------------- /ShapeLab/ShapeLab.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 2022-03-03T21:58:13.4723963Z 6 | 7 | 8 | 2022-03-03T21:58:13.8467695Z 9 | 10 | -------------------------------------------------------------------------------- /ShapeLab/SurfaceGuidanceField.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "..\QMeshLib\PolygenMesh.h" 3 | #include "..\ThirdPartyDependence\Eigen\Eigen" 4 | 5 | class SurfaceGuidanceField 6 | { 7 | public: 8 | SurfaceGuidanceField() { }; 9 | ~SurfaceGuidanceField() { }; 10 | 11 | void runIsoLayerVectorFielCompute(QMeshPatch* isoSurface); 12 | bool scalarFieldCompute_isoSurface(QMeshPatch* layer); 13 | void scalarFieldCompute_supportSurface(QMeshPatch* layer); 14 | 15 | Eigen::Vector3d inputDir; 16 | 17 | private: 18 | bool _initializeIsoSurface(QMeshPatch* isoSurface); 19 | bool _SurfaceVectorFieldOrientationDetection(QMeshPatch* isoSurface); 20 | void _projectVectortoSurface(QMeshFace* Face); 21 | 22 | void _surfaceVectorFieldFulfill(QMeshPatch* isoSurface, int iter, int type); 23 | void _surfaceVectorFieldFillNIERegion(QMeshPatch* isoSurface); 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /ShapeLab/heatMethod.h: -------------------------------------------------------------------------------- 1 | /*Heat method field value computing*/ 2 | /*Written by Guoxin Fang 08-15-2020 (last updated)*/ 3 | 4 | #ifndef HEATMETHOD_H 5 | #define HEATMETHOD_H 6 | 7 | #include "PolygenMesh.h" 8 | #include "../GLKLib/GLKObList.h" 9 | #include "..\ThirdPartyDependence\Eigen\Eigen" 10 | 11 | 12 | class heatMethod 13 | { 14 | public: 15 | heatMethod(QMeshPatch* inputMesh); 16 | ~heatMethod(); 17 | 18 | void compBoundaryHeatKernel(); 19 | 20 | void runHeatMethod(); 21 | void meshRefinement(); 22 | 23 | private: 24 | QMeshPatch* surfaceMesh; 25 | 26 | Eigen::SparseMatrix L; 27 | Eigen::SparseMatrix A; 28 | double t; 29 | Eigen::SparseMatrix F; 30 | Eigen::SimplicialCholesky> poissonSolver; 31 | Eigen::SimplicialCholesky> heatSolver; 32 | 33 | void _initBoundaryHeatKernel(); 34 | 35 | int detectGenus(); 36 | void initialMeshIndex(); 37 | void heatMethodPreProcess(); 38 | void heatMethodCompwithConstrain(Eigen::VectorXd& u); 39 | 40 | void buildLaplacian(Eigen::SparseMatrix& L, bool constrain) const; 41 | void buildAreaMatrix(Eigen::SparseMatrix& A) const; 42 | void computeVectorField(Eigen::MatrixXd& gradients, const Eigen::VectorXd& u) const; 43 | void computeIntegratedDivergence(Eigen::VectorXd& integratedDivs, 44 | const Eigen::MatrixXd& gradients) const; 45 | double subtractMinimumDistance(Eigen::VectorXd& phi) const; 46 | double computeEdgeAngle(QMeshNode* Node, QMeshEdge* connectEdge) const; 47 | double meanEdgeLength() const; 48 | }; 49 | 50 | #endif // HEATMETHOD_H 51 | -------------------------------------------------------------------------------- /ShapeLab/main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 7 | 8 | QApplication a(argc, argv); 9 | MainWindow w; 10 | w.show(); 11 | 12 | return a.exec(); 13 | } 14 | -------------------------------------------------------------------------------- /ShapeLab/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ShapeLab/resource/Back View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Back View.png -------------------------------------------------------------------------------- /ShapeLab/resource/Bottom View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Bottom View.png -------------------------------------------------------------------------------- /ShapeLab/resource/FaceNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/FaceNormal.png -------------------------------------------------------------------------------- /ShapeLab/resource/Front View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Front View.png -------------------------------------------------------------------------------- /ShapeLab/resource/InputSelection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/InputSelection.png -------------------------------------------------------------------------------- /ShapeLab/resource/Isometric View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Isometric View.png -------------------------------------------------------------------------------- /ShapeLab/resource/Left View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Left View.png -------------------------------------------------------------------------------- /ShapeLab/resource/Mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Mesh.png -------------------------------------------------------------------------------- /ShapeLab/resource/Node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Node.png -------------------------------------------------------------------------------- /ShapeLab/resource/NodeNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/NodeNormal.png -------------------------------------------------------------------------------- /ShapeLab/resource/Open Folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Open Folder.png -------------------------------------------------------------------------------- /ShapeLab/resource/Profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Profile.png -------------------------------------------------------------------------------- /ShapeLab/resource/Right View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Right View.png -------------------------------------------------------------------------------- /ShapeLab/resource/Save as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Save as.png -------------------------------------------------------------------------------- /ShapeLab/resource/SaveSelection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/SaveSelection.png -------------------------------------------------------------------------------- /ShapeLab/resource/Shade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Shade.png -------------------------------------------------------------------------------- /ShapeLab/resource/Top View.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Top View.png -------------------------------------------------------------------------------- /ShapeLab/resource/Zoom All.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Zoom All.png -------------------------------------------------------------------------------- /ShapeLab/resource/Zoom In.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Zoom In.png -------------------------------------------------------------------------------- /ShapeLab/resource/Zoom Out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Zoom Out.png -------------------------------------------------------------------------------- /ShapeLab/resource/Zoom Window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/Zoom Window.png -------------------------------------------------------------------------------- /ShapeLab/resource/abaqus logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/abaqus logo.png -------------------------------------------------------------------------------- /ShapeLab/resource/selectEdge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/selectEdge.png -------------------------------------------------------------------------------- /ShapeLab/resource/selectFace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/selectFace.png -------------------------------------------------------------------------------- /ShapeLab/resource/selectFix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/selectFix.png -------------------------------------------------------------------------------- /ShapeLab/resource/selectHandle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/selectHandle.png -------------------------------------------------------------------------------- /ShapeLab/resource/selectNode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/resource/selectNode.png -------------------------------------------------------------------------------- /ShapeLab/toolpathgeneration.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLPATHGENERATION_H 2 | #define TOOLPATHGENERATION_H 3 | 4 | #include "QMeshPatch.h" 5 | #include "PolygenMesh.h" 6 | #include "QMeshNode.h" 7 | #include "QMeshEdge.h" 8 | #include "QMeshFace.h" 9 | #include "../GLKLib/GLKObList.h" 10 | 11 | class toolPathGeneration 12 | { 13 | public: 14 | toolPathGeneration(QMeshPatch* inputMesh); 15 | ~toolPathGeneration(); 16 | 17 | void generateZigzagToolPath(PolygenMesh* tPath, int Num); 18 | void generateBundaryToolPath(PolygenMesh* tPath, int Num, double offset); 19 | 20 | void resampling(PolygenMesh* tPath); 21 | 22 | int autoComputeTPathNum(bool type); 23 | double autoComputeZigZagTPathOffestingValue( 24 | int zigzagTPathNum, int boundaryTPathNum, double boundaryTPathOffset); 25 | 26 | void mergeFieldforCCF(); 27 | 28 | double minBoundaryFieldValue; 29 | double maxGapDist; 30 | double maxConnectDist; 31 | double boundaryGapDist; 32 | double toolpathOffset; 33 | 34 | bool breakZigzagbyBoundary = true; 35 | 36 | 37 | private: 38 | GLKObList zigzagPathList; //install zigzag isonode 39 | GLKObList boundPathList; //install boundary isonode 40 | 41 | Eigen::MatrixXi edgePIndex; //connection between isonode and surfaceMesh edge (zigzag) 42 | Eigen::MatrixXi edgeBPIndex; //connection between isonode and surfaceMesh edge (boundary) 43 | 44 | QMeshPatch* surfaceMesh; 45 | 46 | double resamplingLength; 47 | int minZigZagtoolpathNodeNum; 48 | 49 | void initialize(int Num); 50 | void initialize(int Num, double offset); 51 | 52 | /* Below are the function for zigzag tool path generation */ 53 | bool generateZigZagIsoNode(int Num); 54 | 55 | bool generateSingleZigzagToolPathIsoNode(QMeshPatch* singlePath, double isoValue); 56 | void connectZigZagToolPathToRegion(PolygenMesh* tPath); 57 | QMeshNode* connectSingleZigZagToolPathandGenerateEdge( 58 | QMeshNode* startNode, QMeshNode *edgeSNode, QMeshPatch* tPathRegion, QMeshPatch* thisTPath, double endPointPos[]); 59 | 60 | /* Below are the function for boundary tool path generation */ 61 | void generateBoundaryIsoNode(int Num, double offset); 62 | 63 | void generateSingleBoundaryToolPathIsoNode(QMeshPatch* singlePath, double isoValue); 64 | void buildOutRingToolPathandConnectZigzagPath(PolygenMesh* tPath); 65 | void buildOutRingToolPath_without_ConnectZigzagPath(PolygenMesh* tPath); 66 | 67 | 68 | 69 | void generateSingleBoundaryToolPath(PolygenMesh* tPath, double isoValue); 70 | QMeshNode* buildOneRingBoundaryToolPath(QMeshNode* startNode, QMeshNode*sNode, QMeshPatch* patch, QMeshPatch* boundIsoPatch); 71 | QMeshNode* findNextBoundaryToolPath(QMeshNode* startNode, QMeshPatch* boundIsoPatch); 72 | QMeshNode* findNextNearestPoint(QMeshNode* startNode, QMeshPatch* boundIsoPatch); 73 | 74 | /* Other assistant function */ 75 | double computeAverageConnectEdgeLength(QMeshPatch* patch); 76 | double resamplingSinglePatch(QMeshPatch* patch); 77 | 78 | /* Other assistant function */ 79 | bool detectSingleZigZagToolPathisProcessed(QMeshPatch* singlePath); 80 | bool detectAllZigZagToolPathisProcessed(); 81 | bool detectAllBoundaryToolPathisProcessed(); 82 | 83 | 84 | 85 | QMeshNode* buildNewNodetoQMeshPatch(QMeshPatch* patch, double pp[], double normal[]); 86 | QMeshEdge* buildNewEdgetoQMeshPatch(QMeshPatch* patch, QMeshNode* startNode, QMeshNode* endNode); 87 | 88 | bool runBreakingChecking(double firstCurve_IsoValue, double minBoundaryFieldValue); 89 | }; 90 | 91 | #endif // TOOLPATHGENERATION_H 92 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/DijkstraShortestPath.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/DijkstraShortestPath.obj -------------------------------------------------------------------------------- /ShapeLab/x64/Release/GcodeGeneration.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/GcodeGeneration.obj -------------------------------------------------------------------------------- /ShapeLab/x64/Release/MainWindow.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/MainWindow.obj -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.Build.CppClean.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.Build.CppClean.log -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.log: -------------------------------------------------------------------------------- 1 |  moc_MainWindow.cpp 2 | D:\MANY_3DP_CNC_CAM\ShapeLab\MainWindow.h(4,10): fatal error C1083: 无法打开包括文件: “QMainWindow”: No such file or directory 3 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CustomBuild.command.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\SHAPELAB\RELEASE\MOC_PREDEFS.H.CBT 2 | cl -Bx"C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\Qt5.12.3\5.12.3\msvc2017_64\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h 3 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CustomBuild.read.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\SHAPELAB\RELEASE\MOC_PREDEFS.H.CBT 2 | C:\QT\QT5.12.3\5.12.3\MSVC2017_64\MKSPECS\FEATURES\DATA\DUMMY.CPP 3 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/CustomBuild.write.1.tlog: -------------------------------------------------------------------------------- 1 | ^D:\MANY_3DP_CNC_CAM\SHAPELAB\RELEASE\MOC_PREDEFS.H.CBT 2 | D:\MANY_3DP_CNC_CAM\SHAPELAB\RELEASE\MOC_PREDEFS.H 3 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/ShapeLab.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.25.28610:TargetPlatformVersion=10.0.18362.0: 2 | Release|x64|D:\MANY_3DP_CNC_CAM\| 3 | -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/ShapeLab.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/ShapeLab.write.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/moc.read.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/moc.read.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/moc.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/moc.write.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/rcc.read.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/rcc.read.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/rcc.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/rcc.write.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/uic.read.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/uic.read.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/uic.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/uic.write.1u.tlog -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /ShapeLab/x64/Release/ShapeLab.vcxproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/ShapeLab.vcxproj.FileListAbsolute.txt -------------------------------------------------------------------------------- /ShapeLab/x64/Release/main.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/main.obj -------------------------------------------------------------------------------- /ShapeLab/x64/Release/qrc_ShapeLab.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/qrc_ShapeLab.obj -------------------------------------------------------------------------------- /ShapeLab/x64/Release/qt_work.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ShapeLab/x64/Release/qt_work.log -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h") 20 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_CHOLESKY_MODULE_H 9 | #define EIGEN_CHOLESKY_MODULE_H 10 | 11 | #include "Core" 12 | #include "Jacobi" 13 | 14 | #include "src/Core/util/DisableStupidWarnings.h" 15 | 16 | /** \defgroup Cholesky_Module Cholesky module 17 | * 18 | * 19 | * 20 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 21 | * Those decompositions are also accessible via the following methods: 22 | * - MatrixBase::llt() 23 | * - MatrixBase::ldlt() 24 | * - SelfAdjointView::llt() 25 | * - SelfAdjointView::ldlt() 26 | * 27 | * \code 28 | * #include 29 | * \endcode 30 | */ 31 | 32 | #include "src/Cholesky/LLT.h" 33 | #include "src/Cholesky/LDLT.h" 34 | #ifdef EIGEN_USE_LAPACKE 35 | #ifdef EIGEN_USE_MKL 36 | #include "mkl_lapacke.h" 37 | #else 38 | #include "src/misc/lapacke.h" 39 | #endif 40 | #include "src/Cholesky/LLT_LAPACKE.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_CHOLESKY_MODULE_H 46 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 47 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 9 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | /** \ingroup Support_modules 20 | * \defgroup CholmodSupport_Module CholmodSupport module 21 | * 22 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 23 | * It provides the two following main factorization classes: 24 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 25 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 26 | * 27 | * For the sake of completeness, this module also propose the two following classes: 28 | * - class CholmodSimplicialLLT 29 | * - class CholmodSimplicialLDLT 30 | * Note that these classes does not bring any particular advantage compared to the built-in 31 | * SimplicialLLT and SimplicialLDLT factorization classes. 32 | * 33 | * \code 34 | * #include 35 | * \endcode 36 | * 37 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. 38 | * The dependencies depend on how cholmod has been compiled. 39 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 40 | * 41 | */ 42 | 43 | #include "src/CholmodSupport/CholmodSupport.h" 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 48 | 49 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | #include "Sparse" 3 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_EIGENVALUES_MODULE_H 9 | #define EIGEN_EIGENVALUES_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Cholesky" 16 | #include "Jacobi" 17 | #include "Householder" 18 | #include "LU" 19 | #include "Geometry" 20 | 21 | /** \defgroup Eigenvalues_Module Eigenvalues module 22 | * 23 | * 24 | * 25 | * This module mainly provides various eigenvalue solvers. 26 | * This module also provides some MatrixBase methods, including: 27 | * - MatrixBase::eigenvalues(), 28 | * - MatrixBase::operatorNorm() 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | #include "src/misc/RealSvd2x2.h" 36 | #include "src/Eigenvalues/Tridiagonalization.h" 37 | #include "src/Eigenvalues/RealSchur.h" 38 | #include "src/Eigenvalues/EigenSolver.h" 39 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 40 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 41 | #include "src/Eigenvalues/HessenbergDecomposition.h" 42 | #include "src/Eigenvalues/ComplexSchur.h" 43 | #include "src/Eigenvalues/ComplexEigenSolver.h" 44 | #include "src/Eigenvalues/RealQZ.h" 45 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 46 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 47 | #ifdef EIGEN_USE_LAPACKE 48 | #ifdef EIGEN_USE_MKL 49 | #include "mkl_lapacke.h" 50 | #else 51 | #include "src/misc/lapacke.h" 52 | #endif 53 | #include "src/Eigenvalues/RealSchur_LAPACKE.h" 54 | #include "src/Eigenvalues/ComplexSchur_LAPACKE.h" 55 | #include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h" 56 | #endif 57 | 58 | #include "src/Core/util/ReenableStupidWarnings.h" 59 | 60 | #endif // EIGEN_EIGENVALUES_MODULE_H 61 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 62 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_GEOMETRY_MODULE_H 9 | #define EIGEN_GEOMETRY_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "SVD" 16 | #include "LU" 17 | #include 18 | 19 | /** \defgroup Geometry_Module Geometry module 20 | * 21 | * This module provides support for: 22 | * - fixed-size homogeneous transformations 23 | * - translation, scaling, 2D and 3D rotations 24 | * - \link Quaternion quaternions \endlink 25 | * - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3) 26 | * - orthognal vector generation (\ref MatrixBase::unitOrthogonal) 27 | * - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink 28 | * - \link AlignedBox axis aligned bounding boxes \endlink 29 | * - \link umeyama least-square transformation fitting \endlink 30 | * 31 | * \code 32 | * #include 33 | * \endcode 34 | */ 35 | 36 | #include "src/Geometry/OrthoMethods.h" 37 | #include "src/Geometry/EulerAngles.h" 38 | 39 | #include "src/Geometry/Homogeneous.h" 40 | #include "src/Geometry/RotationBase.h" 41 | #include "src/Geometry/Rotation2D.h" 42 | #include "src/Geometry/Quaternion.h" 43 | #include "src/Geometry/AngleAxis.h" 44 | #include "src/Geometry/Transform.h" 45 | #include "src/Geometry/Translation.h" 46 | #include "src/Geometry/Scaling.h" 47 | #include "src/Geometry/Hyperplane.h" 48 | #include "src/Geometry/ParametrizedLine.h" 49 | #include "src/Geometry/AlignedBox.h" 50 | #include "src/Geometry/Umeyama.h" 51 | 52 | // Use the SSE optimized version whenever possible. At the moment the 53 | // SSE version doesn't compile when AVX is enabled 54 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX 55 | #include "src/Geometry/arch/Geometry_SSE.h" 56 | #endif 57 | 58 | #include "src/Core/util/ReenableStupidWarnings.h" 59 | 60 | #endif // EIGEN_GEOMETRY_MODULE_H 61 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 62 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Householder: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 9 | #define EIGEN_HOUSEHOLDER_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Householder_Module Householder module 16 | * This module provides Householder transformations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/Householder/Householder.h" 24 | #include "src/Householder/HouseholderSequence.h" 25 | #include "src/Householder/BlockHouseholder.h" 26 | 27 | #include "src/Core/util/ReenableStupidWarnings.h" 28 | 29 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 30 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 31 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 9 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 10 | 11 | #include "SparseCore" 12 | #include "OrderingMethods" 13 | 14 | #include "src/Core/util/DisableStupidWarnings.h" 15 | 16 | /** 17 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 18 | * 19 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 20 | * Those solvers are accessible via the following classes: 21 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 22 | * - LeastSquaresConjugateGradient for rectangular least-square problems, 23 | * - BiCGSTAB for general square matrices. 24 | * 25 | * These iterative solvers are associated with some preconditioners: 26 | * - IdentityPreconditioner - not really useful 27 | * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices. 28 | * - IncompleteLUT - incomplete LU factorization with dual thresholding 29 | * 30 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 31 | * 32 | \code 33 | #include 34 | \endcode 35 | */ 36 | 37 | #include "src/IterativeLinearSolvers/SolveWithGuess.h" 38 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 39 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 40 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 41 | #include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h" 42 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 43 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 44 | #include "src/IterativeLinearSolvers/IncompleteCholesky.h" 45 | 46 | #include "src/Core/util/ReenableStupidWarnings.h" 47 | 48 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 49 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_JACOBI_MODULE_H 9 | #define EIGEN_JACOBI_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Jacobi_Module Jacobi module 16 | * This module provides Jacobi and Givens rotations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | * 22 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 23 | * - MatrixBase::applyOnTheLeft() 24 | * - MatrixBase::applyOnTheRight(). 25 | */ 26 | 27 | #include "src/Jacobi/Jacobi.h" 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_JACOBI_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | 34 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/KLUSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_KLUSUPPORT_MODULE_H 9 | #define EIGEN_KLUSUPPORT_MODULE_H 10 | 11 | #include 12 | 13 | #include 14 | 15 | extern "C" { 16 | #include 17 | #include 18 | } 19 | 20 | /** \ingroup Support_modules 21 | * \defgroup KLUSupport_Module KLUSupport module 22 | * 23 | * This module provides an interface to the KLU library which is part of the suitesparse package. 24 | * It provides the following factorization class: 25 | * - class KLU: a sparse LU factorization, well-suited for circuit simulation. 26 | * 27 | * \code 28 | * #include 29 | * \endcode 30 | * 31 | * In order to use this module, the klu and btf headers must be accessible from the include paths, and your binary must be linked to the klu library and its dependencies. 32 | * The dependencies depend on how umfpack has been compiled. 33 | * For a cmake based project, you can use our FindKLU.cmake module to help you in this task. 34 | * 35 | */ 36 | 37 | #include "src/KLUSupport/KLUSupport.h" 38 | 39 | #include 40 | 41 | #endif // EIGEN_KLUSUPPORT_MODULE_H 42 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/LU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_LU_MODULE_H 9 | #define EIGEN_LU_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup LU_Module LU module 16 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 17 | * This module defines the following MatrixBase methods: 18 | * - MatrixBase::inverse() 19 | * - MatrixBase::determinant() 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/misc/Kernel.h" 27 | #include "src/misc/Image.h" 28 | #include "src/LU/FullPivLU.h" 29 | #include "src/LU/PartialPivLU.h" 30 | #ifdef EIGEN_USE_LAPACKE 31 | #ifdef EIGEN_USE_MKL 32 | #include "mkl_lapacke.h" 33 | #else 34 | #include "src/misc/lapacke.h" 35 | #endif 36 | #include "src/LU/PartialPivLU_LAPACKE.h" 37 | #endif 38 | #include "src/LU/Determinant.h" 39 | #include "src/LU/InverseImpl.h" 40 | 41 | // Use the SSE optimized version whenever possible. At the moment the 42 | // SSE version doesn't compile when AVX is enabled 43 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX 44 | #include "src/LU/arch/Inverse_SSE.h" 45 | #endif 46 | 47 | #include "src/Core/util/ReenableStupidWarnings.h" 48 | 49 | #endif // EIGEN_LU_MODULE_H 50 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 51 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_METISSUPPORT_MODULE_H 9 | #define EIGEN_METISSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | 20 | /** \ingroup Support_modules 21 | * \defgroup MetisSupport_Module MetisSupport module 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 27 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 28 | */ 29 | 30 | 31 | #include "src/MetisSupport/MetisSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_METISSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/OrderingMethods: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_ORDERINGMETHODS_MODULE_H 9 | #define EIGEN_ORDERINGMETHODS_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** 16 | * \defgroup OrderingMethods_Module OrderingMethods module 17 | * 18 | * This module is currently for internal use only 19 | * 20 | * It defines various built-in and external ordering methods for sparse matrices. 21 | * They are typically used to reduce the number of elements during 22 | * the sparse matrix decomposition (LLT, LU, QR). 23 | * Precisely, in a preprocessing step, a permutation matrix P is computed using 24 | * those ordering methods and applied to the columns of the matrix. 25 | * Using for instance the sparse Cholesky decomposition, it is expected that 26 | * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). 27 | * 28 | * 29 | * Usage : 30 | * \code 31 | * #include 32 | * \endcode 33 | * 34 | * A simple usage is as a template parameter in the sparse decomposition classes : 35 | * 36 | * \code 37 | * SparseLU > solver; 38 | * \endcode 39 | * 40 | * \code 41 | * SparseQR > solver; 42 | * \endcode 43 | * 44 | * It is possible as well to call directly a particular ordering method for your own purpose, 45 | * \code 46 | * AMDOrdering ordering; 47 | * PermutationMatrix perm; 48 | * SparseMatrix A; 49 | * //Fill the matrix ... 50 | * 51 | * ordering(A, perm); // Call AMD 52 | * \endcode 53 | * 54 | * \note Some of these methods (like AMD or METIS), need the sparsity pattern 55 | * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, 56 | * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. 57 | * If your matrix is already symmetric (at leat in structure), you can avoid that 58 | * by calling the method with a SelfAdjointView type. 59 | * 60 | * \code 61 | * // Call the ordering on the pattern of the lower triangular matrix A 62 | * ordering(A.selfadjointView(), perm); 63 | * \endcode 64 | */ 65 | 66 | #ifndef EIGEN_MPL2_ONLY 67 | #include "src/OrderingMethods/Amd.h" 68 | #endif 69 | 70 | #include "src/OrderingMethods/Ordering.h" 71 | #include "src/Core/util/ReenableStupidWarnings.h" 72 | 73 | #endif // EIGEN_ORDERINGMETHODS_MODULE_H 74 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 9 | #define EIGEN_PASTIXSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | #include 18 | } 19 | 20 | #ifdef complex 21 | #undef complex 22 | #endif 23 | 24 | /** \ingroup Support_modules 25 | * \defgroup PaStiXSupport_Module PaStiXSupport module 26 | * 27 | * This module provides an interface to the PaSTiX library. 28 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 29 | * It provides the two following main factorization classes: 30 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 31 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 32 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 33 | * 34 | * \code 35 | * #include 36 | * \endcode 37 | * 38 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 39 | * This wrapper resuires PaStiX version 5.x compiled without MPI support. 40 | * The dependencies depend on how PaSTiX has been compiled. 41 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 42 | * 43 | */ 44 | 45 | #include "src/PaStiXSupport/PaStiXSupport.h" 46 | 47 | #include "src/Core/util/ReenableStupidWarnings.h" 48 | 49 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 50 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 9 | #define EIGEN_PARDISOSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup PardisoSupport_Module PardisoSupport module 19 | * 20 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 27 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 28 | * 29 | */ 30 | 31 | #include "src/PardisoSupport/PardisoSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/QR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QR_MODULE_H 9 | #define EIGEN_QR_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Cholesky" 16 | #include "Jacobi" 17 | #include "Householder" 18 | 19 | /** \defgroup QR_Module QR module 20 | * 21 | * 22 | * 23 | * This module provides various QR decompositions 24 | * This module also provides some MatrixBase methods, including: 25 | * - MatrixBase::householderQr() 26 | * - MatrixBase::colPivHouseholderQr() 27 | * - MatrixBase::fullPivHouseholderQr() 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | */ 33 | 34 | #include "src/QR/HouseholderQR.h" 35 | #include "src/QR/FullPivHouseholderQR.h" 36 | #include "src/QR/ColPivHouseholderQR.h" 37 | #include "src/QR/CompleteOrthogonalDecomposition.h" 38 | #ifdef EIGEN_USE_LAPACKE 39 | #ifdef EIGEN_USE_MKL 40 | #include "mkl_lapacke.h" 41 | #else 42 | #include "src/misc/lapacke.h" 43 | #endif 44 | #include "src/QR/HouseholderQR_LAPACKE.h" 45 | #include "src/QR/ColPivHouseholderQR_LAPACKE.h" 46 | #endif 47 | 48 | #include "src/Core/util/ReenableStupidWarnings.h" 49 | 50 | #endif // EIGEN_QR_MODULE_H 51 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 52 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QTMALLOC_MODULE_H 9 | #define EIGEN_QTMALLOC_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 14 | 15 | #include "src/Core/util/DisableStupidWarnings.h" 16 | 17 | void *qMalloc(std::size_t size) 18 | { 19 | return Eigen::internal::aligned_malloc(size); 20 | } 21 | 22 | void qFree(void *ptr) 23 | { 24 | Eigen::internal::aligned_free(ptr); 25 | } 26 | 27 | void *qRealloc(void *ptr, std::size_t size) 28 | { 29 | void* newPtr = Eigen::internal::aligned_malloc(size); 30 | std::memcpy(newPtr, ptr, size); 31 | Eigen::internal::aligned_free(ptr); 32 | return newPtr; 33 | } 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | 39 | #endif // EIGEN_QTMALLOC_MODULE_H 40 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 41 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 9 | #define EIGEN_SPQRSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "SuiteSparseQR.hpp" 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup SPQRSupport_Module SuiteSparseQR module 19 | * 20 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 27 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 28 | * 29 | */ 30 | 31 | #include "src/CholmodSupport/CholmodSupport.h" 32 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SVD: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SVD_MODULE_H 9 | #define EIGEN_SVD_MODULE_H 10 | 11 | #include "QR" 12 | #include "Householder" 13 | #include "Jacobi" 14 | 15 | #include "src/Core/util/DisableStupidWarnings.h" 16 | 17 | /** \defgroup SVD_Module SVD module 18 | * 19 | * 20 | * 21 | * This module provides SVD decomposition for matrices (both real and complex). 22 | * Two decomposition algorithms are provided: 23 | * - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones. 24 | * - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems. 25 | * These decompositions are accessible via the respective classes and following MatrixBase methods: 26 | * - MatrixBase::jacobiSvd() 27 | * - MatrixBase::bdcSvd() 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | */ 33 | 34 | #include "src/misc/RealSvd2x2.h" 35 | #include "src/SVD/UpperBidiagonalization.h" 36 | #include "src/SVD/SVDBase.h" 37 | #include "src/SVD/JacobiSVD.h" 38 | #include "src/SVD/BDCSVD.h" 39 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 40 | #ifdef EIGEN_USE_MKL 41 | #include "mkl_lapacke.h" 42 | #else 43 | #include "src/misc/lapacke.h" 44 | #endif 45 | #include "src/SVD/JacobiSVD_LAPACKE.h" 46 | #endif 47 | 48 | #include "src/Core/util/ReenableStupidWarnings.h" 49 | 50 | #endif // EIGEN_SVD_MODULE_H 51 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 52 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSE_MODULE_H 9 | #define EIGEN_SPARSE_MODULE_H 10 | 11 | /** \defgroup Sparse_Module Sparse meta-module 12 | * 13 | * Meta-module including all related modules: 14 | * - \ref SparseCore_Module 15 | * - \ref OrderingMethods_Module 16 | * - \ref SparseCholesky_Module 17 | * - \ref SparseLU_Module 18 | * - \ref SparseQR_Module 19 | * - \ref IterativeLinearSolvers_Module 20 | * 21 | \code 22 | #include 23 | \endcode 24 | */ 25 | 26 | #include "SparseCore" 27 | #include "OrderingMethods" 28 | #ifndef EIGEN_MPL2_ONLY 29 | #include "SparseCholesky" 30 | #endif 31 | #include "SparseLU" 32 | #include "SparseQR" 33 | #include "IterativeLinearSolvers" 34 | 35 | #endif // EIGEN_SPARSE_MODULE_H 36 | 37 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/SparseCholesky/SimplicialCholesky.h" 38 | 39 | #ifndef EIGEN_MPL2_ONLY 40 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 46 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SparseCore: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSECORE_MODULE_H 9 | #define EIGEN_SPARSECORE_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | /** 22 | * \defgroup SparseCore_Module SparseCore module 23 | * 24 | * This module provides a sparse matrix representation, and basic associated matrix manipulations 25 | * and operations. 26 | * 27 | * See the \ref TutorialSparse "Sparse tutorial" 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | * 33 | * This module depends on: Core. 34 | */ 35 | 36 | #include "src/SparseCore/SparseUtil.h" 37 | #include "src/SparseCore/SparseMatrixBase.h" 38 | #include "src/SparseCore/SparseAssign.h" 39 | #include "src/SparseCore/CompressedStorage.h" 40 | #include "src/SparseCore/AmbiVector.h" 41 | #include "src/SparseCore/SparseCompressedBase.h" 42 | #include "src/SparseCore/SparseMatrix.h" 43 | #include "src/SparseCore/SparseMap.h" 44 | #include "src/SparseCore/MappedSparseMatrix.h" 45 | #include "src/SparseCore/SparseVector.h" 46 | #include "src/SparseCore/SparseRef.h" 47 | #include "src/SparseCore/SparseCwiseUnaryOp.h" 48 | #include "src/SparseCore/SparseCwiseBinaryOp.h" 49 | #include "src/SparseCore/SparseTranspose.h" 50 | #include "src/SparseCore/SparseBlock.h" 51 | #include "src/SparseCore/SparseDot.h" 52 | #include "src/SparseCore/SparseRedux.h" 53 | #include "src/SparseCore/SparseView.h" 54 | #include "src/SparseCore/SparseDiagonalProduct.h" 55 | #include "src/SparseCore/ConservativeSparseSparseProduct.h" 56 | #include "src/SparseCore/SparseSparseProductWithPruning.h" 57 | #include "src/SparseCore/SparseProduct.h" 58 | #include "src/SparseCore/SparseDenseProduct.h" 59 | #include "src/SparseCore/SparseSelfAdjointView.h" 60 | #include "src/SparseCore/SparseTriangularView.h" 61 | #include "src/SparseCore/TriangularSolver.h" 62 | #include "src/SparseCore/SparsePermutation.h" 63 | #include "src/SparseCore/SparseFuzzy.h" 64 | #include "src/SparseCore/SparseSolverBase.h" 65 | 66 | #include "src/Core/util/ReenableStupidWarnings.h" 67 | 68 | #endif // EIGEN_SPARSECORE_MODULE_H 69 | 70 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | // Ordering interface 24 | #include "OrderingMethods" 25 | 26 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 27 | 28 | #include "src/SparseLU/SparseLU_Structs.h" 29 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 30 | #include "src/SparseLU/SparseLUImpl.h" 31 | #include "src/SparseCore/SparseColEtree.h" 32 | #include "src/SparseLU/SparseLU_Memory.h" 33 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 34 | #include "src/SparseLU/SparseLU_relax_snode.h" 35 | #include "src/SparseLU/SparseLU_pivotL.h" 36 | #include "src/SparseLU/SparseLU_panel_dfs.h" 37 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 38 | #include "src/SparseLU/SparseLU_panel_bmod.h" 39 | #include "src/SparseLU/SparseLU_column_dfs.h" 40 | #include "src/SparseLU/SparseLU_column_bmod.h" 41 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 42 | #include "src/SparseLU/SparseLU_pruneL.h" 43 | #include "src/SparseLU/SparseLU_Utils.h" 44 | #include "src/SparseLU/SparseLU.h" 45 | 46 | #endif // EIGEN_SPARSELU_MODULE_H 47 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSEQR_MODULE_H 9 | #define EIGEN_SPARSEQR_MODULE_H 10 | 11 | #include "SparseCore" 12 | #include "OrderingMethods" 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup SparseQR_Module SparseQR module 16 | * \brief Provides QR decomposition for sparse matrices 17 | * 18 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 19 | * The columns of the input matrix should be reordered to limit the fill-in during the 20 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 21 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 22 | * of built-in and external ordering methods. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | * 28 | * 29 | */ 30 | 31 | #include "OrderingMethods" 32 | #include "src/SparseCore/SparseColEtree.h" 33 | #include "src/SparseQR/SparseQR.h" 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 9 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #ifdef EMPTY 16 | #define EIGEN_EMPTY_WAS_ALREADY_DEFINED 17 | #endif 18 | 19 | typedef int int_t; 20 | #include 21 | #include 22 | #include 23 | 24 | // slu_util.h defines a preprocessor token named EMPTY which is really polluting, 25 | // so we remove it in favor of a SUPERLU_EMPTY token. 26 | // If EMPTY was already defined then we don't undef it. 27 | 28 | #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) 29 | # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED 30 | #elif defined(EMPTY) 31 | # undef EMPTY 32 | #endif 33 | 34 | #define SUPERLU_EMPTY (-1) 35 | 36 | namespace Eigen { struct SluMatrix; } 37 | 38 | /** \ingroup Support_modules 39 | * \defgroup SuperLUSupport_Module SuperLUSupport module 40 | * 41 | * This module provides an interface to the SuperLU library. 42 | * It provides the following factorization class: 43 | * - class SuperLU: a supernodal sequential LU factorization. 44 | * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). 45 | * 46 | * \warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported. 47 | * 48 | * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. 49 | * 50 | * \code 51 | * #include 52 | * \endcode 53 | * 54 | * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. 55 | * The dependencies depend on how superlu has been compiled. 56 | * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 57 | * 58 | */ 59 | 60 | #include "src/SuperLUSupport/SuperLUSupport.h" 61 | 62 | #include "src/Core/util/ReenableStupidWarnings.h" 63 | 64 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 65 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 9 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | /** \ingroup Support_modules 20 | * \defgroup UmfPackSupport_Module UmfPackSupport module 21 | * 22 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 23 | * It provides the following factorization class: 24 | * - class UmfPackLU: a multifrontal sequential LU factorization. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 31 | * The dependencies depend on how umfpack has been compiled. 32 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/UmfPackSupport/UmfPackSupport.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 41 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/Assign.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2007 Michael Olbrich 5 | // Copyright (C) 2006-2010 Benoit Jacob 6 | // Copyright (C) 2008 Gael Guennebaud 7 | // 8 | // This Source Code Form is subject to the terms of the Mozilla 9 | // Public License v. 2.0. If a copy of the MPL was not distributed 10 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 11 | 12 | #ifndef EIGEN_ASSIGN_H 13 | #define EIGEN_ASSIGN_H 14 | 15 | namespace Eigen { 16 | 17 | template 18 | template 19 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase 20 | ::lazyAssign(const DenseBase& other) 21 | { 22 | enum{ 23 | SameType = internal::is_same::value 24 | }; 25 | 26 | EIGEN_STATIC_ASSERT_LVALUE(Derived) 27 | EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived) 28 | EIGEN_STATIC_ASSERT(SameType,YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 29 | 30 | eigen_assert(rows() == other.rows() && cols() == other.cols()); 31 | internal::call_assignment_no_alias(derived(),other.derived()); 32 | 33 | return derived(); 34 | } 35 | 36 | template 37 | template 38 | EIGEN_DEVICE_FUNC 39 | EIGEN_STRONG_INLINE Derived& DenseBase::operator=(const DenseBase& other) 40 | { 41 | internal::call_assignment(derived(), other.derived()); 42 | return derived(); 43 | } 44 | 45 | template 46 | EIGEN_DEVICE_FUNC 47 | EIGEN_STRONG_INLINE Derived& DenseBase::operator=(const DenseBase& other) 48 | { 49 | internal::call_assignment(derived(), other.derived()); 50 | return derived(); 51 | } 52 | 53 | template 54 | EIGEN_DEVICE_FUNC 55 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const MatrixBase& other) 56 | { 57 | internal::call_assignment(derived(), other.derived()); 58 | return derived(); 59 | } 60 | 61 | template 62 | template 63 | EIGEN_DEVICE_FUNC 64 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const DenseBase& other) 65 | { 66 | internal::call_assignment(derived(), other.derived()); 67 | return derived(); 68 | } 69 | 70 | template 71 | template 72 | EIGEN_DEVICE_FUNC 73 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const EigenBase& other) 74 | { 75 | internal::call_assignment(derived(), other.derived()); 76 | return derived(); 77 | } 78 | 79 | template 80 | template 81 | EIGEN_DEVICE_FUNC 82 | EIGEN_STRONG_INLINE Derived& MatrixBase::operator=(const ReturnByValue& other) 83 | { 84 | other.derived().evalTo(derived()); 85 | return derived(); 86 | } 87 | 88 | } // end namespace Eigen 89 | 90 | #endif // EIGEN_ASSIGN_H 91 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/DiagonalProduct.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2007-2009 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_DIAGONALPRODUCT_H 12 | #define EIGEN_DIAGONALPRODUCT_H 13 | 14 | namespace Eigen { 15 | 16 | /** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal. 17 | */ 18 | template 19 | template 20 | EIGEN_DEVICE_FUNC inline const Product 21 | MatrixBase::operator*(const DiagonalBase &a_diagonal) const 22 | { 23 | return Product(derived(),a_diagonal.derived()); 24 | } 25 | 26 | } // end namespace Eigen 27 | 28 | #endif // EIGEN_DIAGONALPRODUCT_H 29 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/MathFunctionsImpl.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com) 5 | // Copyright (C) 2016 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_MATHFUNCTIONSIMPL_H 12 | #define EIGEN_MATHFUNCTIONSIMPL_H 13 | 14 | namespace Eigen { 15 | 16 | namespace internal { 17 | 18 | /** \internal \returns the hyperbolic tan of \a a (coeff-wise) 19 | Doesn't do anything fancy, just a 13/6-degree rational interpolant which 20 | is accurate up to a couple of ulp in the range [-9, 9], outside of which 21 | the tanh(x) = +/-1. 22 | 23 | This implementation works on both scalars and packets. 24 | */ 25 | template 26 | T generic_fast_tanh_float(const T& a_x) 27 | { 28 | // Clamp the inputs to the range [-9, 9] since anything outside 29 | // this range is +/-1.0f in single-precision. 30 | const T plus_9 = pset1(9.f); 31 | const T minus_9 = pset1(-9.f); 32 | const T x = pmax(pmin(a_x, plus_9), minus_9); 33 | // The monomial coefficients of the numerator polynomial (odd). 34 | const T alpha_1 = pset1(4.89352455891786e-03f); 35 | const T alpha_3 = pset1(6.37261928875436e-04f); 36 | const T alpha_5 = pset1(1.48572235717979e-05f); 37 | const T alpha_7 = pset1(5.12229709037114e-08f); 38 | const T alpha_9 = pset1(-8.60467152213735e-11f); 39 | const T alpha_11 = pset1(2.00018790482477e-13f); 40 | const T alpha_13 = pset1(-2.76076847742355e-16f); 41 | 42 | // The monomial coefficients of the denominator polynomial (even). 43 | const T beta_0 = pset1(4.89352518554385e-03f); 44 | const T beta_2 = pset1(2.26843463243900e-03f); 45 | const T beta_4 = pset1(1.18534705686654e-04f); 46 | const T beta_6 = pset1(1.19825839466702e-06f); 47 | 48 | // Since the polynomials are odd/even, we need x^2. 49 | const T x2 = pmul(x, x); 50 | 51 | // Evaluate the numerator polynomial p. 52 | T p = pmadd(x2, alpha_13, alpha_11); 53 | p = pmadd(x2, p, alpha_9); 54 | p = pmadd(x2, p, alpha_7); 55 | p = pmadd(x2, p, alpha_5); 56 | p = pmadd(x2, p, alpha_3); 57 | p = pmadd(x2, p, alpha_1); 58 | p = pmul(x, p); 59 | 60 | // Evaluate the denominator polynomial p. 61 | T q = pmadd(x2, beta_6, beta_4); 62 | q = pmadd(x2, q, beta_2); 63 | q = pmadd(x2, q, beta_0); 64 | 65 | // Divide the numerator by the denominator. 66 | return pdiv(p, q); 67 | } 68 | 69 | template 70 | EIGEN_STRONG_INLINE 71 | RealScalar positive_real_hypot(const RealScalar& x, const RealScalar& y) 72 | { 73 | EIGEN_USING_STD_MATH(sqrt); 74 | RealScalar p, qp; 75 | p = numext::maxi(x,y); 76 | if(p==RealScalar(0)) return RealScalar(0); 77 | qp = numext::mini(y,x) / p; 78 | return p * sqrt(RealScalar(1) + qp*qp); 79 | } 80 | 81 | template 82 | struct hypot_impl 83 | { 84 | typedef typename NumTraits::Real RealScalar; 85 | static inline RealScalar run(const Scalar& x, const Scalar& y) 86 | { 87 | EIGEN_USING_STD_MATH(abs); 88 | return positive_real_hypot(abs(x), abs(y)); 89 | } 90 | }; 91 | 92 | } // end namespace internal 93 | 94 | } // end namespace Eigen 95 | 96 | #endif // EIGEN_MATHFUNCTIONSIMPL_H 97 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/SelfCwiseBinaryOp.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SELFCWISEBINARYOP_H 11 | #define EIGEN_SELFCWISEBINARYOP_H 12 | 13 | namespace Eigen { 14 | 15 | // TODO generalize the scalar type of 'other' 16 | 17 | template 18 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase::operator*=(const Scalar& other) 19 | { 20 | typedef typename Derived::PlainObject PlainObject; 21 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::mul_assign_op()); 22 | return derived(); 23 | } 24 | 25 | template 26 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase::operator+=(const Scalar& other) 27 | { 28 | typedef typename Derived::PlainObject PlainObject; 29 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::add_assign_op()); 30 | return derived(); 31 | } 32 | 33 | template 34 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& ArrayBase::operator-=(const Scalar& other) 35 | { 36 | typedef typename Derived::PlainObject PlainObject; 37 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::sub_assign_op()); 38 | return derived(); 39 | } 40 | 41 | template 42 | EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& DenseBase::operator/=(const Scalar& other) 43 | { 44 | typedef typename Derived::PlainObject PlainObject; 45 | internal::call_assignment(this->derived(), PlainObject::Constant(rows(),cols(),other), internal::div_assign_op()); 46 | return derived(); 47 | } 48 | 49 | } // end namespace Eigen 50 | 51 | #endif // EIGEN_SELFCWISEBINARYOP_H 52 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/Swap.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2006-2008 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SWAP_H 11 | #define EIGEN_SWAP_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // Overload default assignPacket behavior for swapping them 18 | template 19 | class generic_dense_assignment_kernel, Specialized> 20 | : public generic_dense_assignment_kernel, BuiltIn> 21 | { 22 | protected: 23 | typedef generic_dense_assignment_kernel, BuiltIn> Base; 24 | using Base::m_dst; 25 | using Base::m_src; 26 | using Base::m_functor; 27 | 28 | public: 29 | typedef typename Base::Scalar Scalar; 30 | typedef typename Base::DstXprType DstXprType; 31 | typedef swap_assign_op Functor; 32 | 33 | EIGEN_DEVICE_FUNC generic_dense_assignment_kernel(DstEvaluatorTypeT &dst, const SrcEvaluatorTypeT &src, const Functor &func, DstXprType& dstExpr) 34 | : Base(dst, src, func, dstExpr) 35 | {} 36 | 37 | template 38 | void assignPacket(Index row, Index col) 39 | { 40 | PacketType tmp = m_src.template packet(row,col); 41 | const_cast(m_src).template writePacket(row,col, m_dst.template packet(row,col)); 42 | m_dst.template writePacket(row,col,tmp); 43 | } 44 | 45 | template 46 | void assignPacket(Index index) 47 | { 48 | PacketType tmp = m_src.template packet(index); 49 | const_cast(m_src).template writePacket(index, m_dst.template packet(index)); 50 | m_dst.template writePacket(index,tmp); 51 | } 52 | 53 | // TODO find a simple way not to have to copy/paste this function from generic_dense_assignment_kernel, by simple I mean no CRTP (Gael) 54 | template 55 | void assignPacketByOuterInner(Index outer, Index inner) 56 | { 57 | Index row = Base::rowIndexByOuterInner(outer, inner); 58 | Index col = Base::colIndexByOuterInner(outer, inner); 59 | assignPacket(row, col); 60 | } 61 | }; 62 | 63 | } // namespace internal 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN_SWAP_H 68 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/arch/AVX/TypeCasting.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2015 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TYPE_CASTING_AVX_H 11 | #define EIGEN_TYPE_CASTING_AVX_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // For now we use SSE to handle integers, so we can't use AVX instructions to cast 18 | // from int to float 19 | template <> 20 | struct type_casting_traits { 21 | enum { 22 | VectorizedCast = 0, 23 | SrcCoeffRatio = 1, 24 | TgtCoeffRatio = 1 25 | }; 26 | }; 27 | 28 | template <> 29 | struct type_casting_traits { 30 | enum { 31 | VectorizedCast = 0, 32 | SrcCoeffRatio = 1, 33 | TgtCoeffRatio = 1 34 | }; 35 | }; 36 | 37 | 38 | 39 | template<> EIGEN_STRONG_INLINE Packet8i pcast(const Packet8f& a) { 40 | return _mm256_cvtps_epi32(a); 41 | } 42 | 43 | template<> EIGEN_STRONG_INLINE Packet8f pcast(const Packet8i& a) { 44 | return _mm256_cvtepi32_ps(a); 45 | } 46 | 47 | } // end namespace internal 48 | 49 | } // end namespace Eigen 50 | 51 | #endif // EIGEN_TYPE_CASTING_AVX_H 52 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/arch/CUDA/MathFunctions.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2014 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MATH_FUNCTIONS_CUDA_H 11 | #define EIGEN_MATH_FUNCTIONS_CUDA_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // Make sure this is only available when targeting a GPU: we don't want to 18 | // introduce conflicts between these packet_traits definitions and the ones 19 | // we'll use on the host side (SSE, AVX, ...) 20 | #if defined(EIGEN_CUDACC) && defined(EIGEN_USE_GPU) 21 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 22 | float4 plog(const float4& a) 23 | { 24 | return make_float4(logf(a.x), logf(a.y), logf(a.z), logf(a.w)); 25 | } 26 | 27 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 28 | double2 plog(const double2& a) 29 | { 30 | using ::log; 31 | return make_double2(log(a.x), log(a.y)); 32 | } 33 | 34 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 35 | float4 plog1p(const float4& a) 36 | { 37 | return make_float4(log1pf(a.x), log1pf(a.y), log1pf(a.z), log1pf(a.w)); 38 | } 39 | 40 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 41 | double2 plog1p(const double2& a) 42 | { 43 | return make_double2(log1p(a.x), log1p(a.y)); 44 | } 45 | 46 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 47 | float4 pexp(const float4& a) 48 | { 49 | return make_float4(expf(a.x), expf(a.y), expf(a.z), expf(a.w)); 50 | } 51 | 52 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 53 | double2 pexp(const double2& a) 54 | { 55 | using ::exp; 56 | return make_double2(exp(a.x), exp(a.y)); 57 | } 58 | 59 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 60 | float4 pexpm1(const float4& a) 61 | { 62 | return make_float4(expm1f(a.x), expm1f(a.y), expm1f(a.z), expm1f(a.w)); 63 | } 64 | 65 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 66 | double2 pexpm1(const double2& a) 67 | { 68 | return make_double2(expm1(a.x), expm1(a.y)); 69 | } 70 | 71 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 72 | float4 psqrt(const float4& a) 73 | { 74 | return make_float4(sqrtf(a.x), sqrtf(a.y), sqrtf(a.z), sqrtf(a.w)); 75 | } 76 | 77 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 78 | double2 psqrt(const double2& a) 79 | { 80 | using ::sqrt; 81 | return make_double2(sqrt(a.x), sqrt(a.y)); 82 | } 83 | 84 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 85 | float4 prsqrt(const float4& a) 86 | { 87 | return make_float4(rsqrtf(a.x), rsqrtf(a.y), rsqrtf(a.z), rsqrtf(a.w)); 88 | } 89 | 90 | template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE 91 | double2 prsqrt(const double2& a) 92 | { 93 | return make_double2(rsqrt(a.x), rsqrt(a.y)); 94 | } 95 | 96 | 97 | #endif 98 | 99 | } // end namespace internal 100 | 101 | } // end namespace Eigen 102 | 103 | #endif // EIGEN_MATH_FUNCTIONS_CUDA_H 104 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/arch/Default/ConjHelper.h: -------------------------------------------------------------------------------- 1 | 2 | // This file is part of Eigen, a lightweight C++ template library 3 | // for linear algebra. 4 | // 5 | // Copyright (C) 2017 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_ARCH_CONJ_HELPER_H 12 | #define EIGEN_ARCH_CONJ_HELPER_H 13 | 14 | #define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL) \ 15 | template<> struct conj_helper { \ 16 | EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_REAL& x, const PACKET_CPLX& y, const PACKET_CPLX& c) const \ 17 | { return padd(c, pmul(x,y)); } \ 18 | EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_REAL& x, const PACKET_CPLX& y) const \ 19 | { return PACKET_CPLX(Eigen::internal::pmul(x, y.v)); } \ 20 | }; \ 21 | \ 22 | template<> struct conj_helper { \ 23 | EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_CPLX& x, const PACKET_REAL& y, const PACKET_CPLX& c) const \ 24 | { return padd(c, pmul(x,y)); } \ 25 | EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_CPLX& x, const PACKET_REAL& y) const \ 26 | { return PACKET_CPLX(Eigen::internal::pmul(x.v, y)); } \ 27 | }; 28 | 29 | #endif // EIGEN_ARCH_CONJ_HELPER_H 30 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/arch/SSE/TypeCasting.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2015 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TYPE_CASTING_SSE_H 11 | #define EIGEN_TYPE_CASTING_SSE_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | template <> 18 | struct type_casting_traits { 19 | enum { 20 | VectorizedCast = 1, 21 | SrcCoeffRatio = 1, 22 | TgtCoeffRatio = 1 23 | }; 24 | }; 25 | 26 | template<> EIGEN_STRONG_INLINE Packet4i pcast(const Packet4f& a) { 27 | return _mm_cvttps_epi32(a); 28 | } 29 | 30 | 31 | template <> 32 | struct type_casting_traits { 33 | enum { 34 | VectorizedCast = 1, 35 | SrcCoeffRatio = 1, 36 | TgtCoeffRatio = 1 37 | }; 38 | }; 39 | 40 | template<> EIGEN_STRONG_INLINE Packet4f pcast(const Packet4i& a) { 41 | return _mm_cvtepi32_ps(a); 42 | } 43 | 44 | 45 | template <> 46 | struct type_casting_traits { 47 | enum { 48 | VectorizedCast = 1, 49 | SrcCoeffRatio = 2, 50 | TgtCoeffRatio = 1 51 | }; 52 | }; 53 | 54 | template<> EIGEN_STRONG_INLINE Packet4f pcast(const Packet2d& a, const Packet2d& b) { 55 | return _mm_shuffle_ps(_mm_cvtpd_ps(a), _mm_cvtpd_ps(b), (1 << 2) | (1 << 6)); 56 | } 57 | 58 | template <> 59 | struct type_casting_traits { 60 | enum { 61 | VectorizedCast = 1, 62 | SrcCoeffRatio = 1, 63 | TgtCoeffRatio = 2 64 | }; 65 | }; 66 | 67 | template<> EIGEN_STRONG_INLINE Packet2d pcast(const Packet4f& a) { 68 | // Simply discard the second half of the input 69 | return _mm_cvtps_pd(a); 70 | } 71 | 72 | 73 | } // end namespace internal 74 | 75 | } // end namespace Eigen 76 | 77 | #endif // EIGEN_TYPE_CASTING_SSE_H 78 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/functors/TernaryFunctors.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2016 Eugene Brevdo 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TERNARY_FUNCTORS_H 11 | #define EIGEN_TERNARY_FUNCTORS_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | //---------- associative ternary functors ---------- 18 | 19 | 20 | 21 | } // end namespace internal 22 | 23 | } // end namespace Eigen 24 | 25 | #endif // EIGEN_TERNARY_FUNCTORS_H 26 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #elif defined __GNUC__ 12 | #pragma GCC diagnostic pop 13 | #endif 14 | 15 | #if defined __NVCC__ 16 | // Don't reenable the diagnostic messages, as it turns out these messages need 17 | // to be disabled at the point of the template instantiation (i.e the user code) 18 | // otherwise they'll be triggered by nvcc. 19 | // #pragma diag_default code_is_unreachable 20 | // #pragma diag_default initialization_not_reachable 21 | // #pragma diag_default 2651 22 | // #pragma diag_default 2653 23 | #endif 24 | 25 | #endif 26 | 27 | #endif // EIGEN_WARNINGS_DISABLED 28 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/QR/HouseholderQR_LAPACKE.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | ******************************************************************************** 28 | * Content : Eigen bindings to LAPACKe 29 | * Householder QR decomposition of a matrix w/o pivoting based on 30 | * LAPACKE_?geqrf function. 31 | ******************************************************************************** 32 | */ 33 | 34 | #ifndef EIGEN_QR_LAPACKE_H 35 | #define EIGEN_QR_LAPACKE_H 36 | 37 | namespace Eigen { 38 | 39 | namespace internal { 40 | 41 | /** \internal Specialization for the data types supported by LAPACKe */ 42 | 43 | #define EIGEN_LAPACKE_QR_NOPIV(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX) \ 44 | template \ 45 | struct householder_qr_inplace_blocked \ 46 | { \ 47 | static void run(MatrixQR& mat, HCoeffs& hCoeffs, Index = 32, \ 48 | typename MatrixQR::Scalar* = 0) \ 49 | { \ 50 | lapack_int m = (lapack_int) mat.rows(); \ 51 | lapack_int n = (lapack_int) mat.cols(); \ 52 | lapack_int lda = (lapack_int) mat.outerStride(); \ 53 | lapack_int matrix_order = (MatrixQR::IsRowMajor) ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ 54 | LAPACKE_##LAPACKE_PREFIX##geqrf( matrix_order, m, n, (LAPACKE_TYPE*)mat.data(), lda, (LAPACKE_TYPE*)hCoeffs.data()); \ 55 | hCoeffs.adjointInPlace(); \ 56 | } \ 57 | }; 58 | 59 | EIGEN_LAPACKE_QR_NOPIV(double, double, d) 60 | EIGEN_LAPACKE_QR_NOPIV(float, float, s) 61 | EIGEN_LAPACKE_QR_NOPIV(dcomplex, lapack_complex_double, z) 62 | EIGEN_LAPACKE_QR_NOPIV(scomplex, lapack_complex_float, c) 63 | 64 | } // end namespace internal 65 | 66 | } // end namespace Eigen 67 | 68 | #endif // EIGEN_QR_LAPACKE_H 69 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/SparseCore/MappedSparseMatrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MAPPED_SPARSEMATRIX_H 11 | #define EIGEN_MAPPED_SPARSEMATRIX_H 12 | 13 | namespace Eigen { 14 | 15 | /** \deprecated Use Map > 16 | * \class MappedSparseMatrix 17 | * 18 | * \brief Sparse matrix 19 | * 20 | * \param _Scalar the scalar type, i.e. the type of the coefficients 21 | * 22 | * See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme. 23 | * 24 | */ 25 | namespace internal { 26 | template 27 | struct traits > : traits > 28 | {}; 29 | } // end namespace internal 30 | 31 | template 32 | class MappedSparseMatrix 33 | : public Map > 34 | { 35 | typedef Map > Base; 36 | 37 | public: 38 | 39 | typedef typename Base::StorageIndex StorageIndex; 40 | typedef typename Base::Scalar Scalar; 41 | 42 | inline MappedSparseMatrix(Index rows, Index cols, Index nnz, StorageIndex* outerIndexPtr, StorageIndex* innerIndexPtr, Scalar* valuePtr, StorageIndex* innerNonZeroPtr = 0) 43 | : Base(rows, cols, nnz, outerIndexPtr, innerIndexPtr, valuePtr, innerNonZeroPtr) 44 | {} 45 | 46 | /** Empty destructor */ 47 | inline ~MappedSparseMatrix() {} 48 | }; 49 | 50 | namespace internal { 51 | 52 | template 53 | struct evaluator > 54 | : evaluator > > 55 | { 56 | typedef MappedSparseMatrix<_Scalar,_Options,_StorageIndex> XprType; 57 | typedef evaluator > Base; 58 | 59 | evaluator() : Base() {} 60 | explicit evaluator(const XprType &mat) : Base(mat) {} 61 | }; 62 | 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN_MAPPED_SPARSEMATRIX_H 68 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | template 17 | bool SparseMatrixBase::isApprox(const SparseMatrixBase& other, const RealScalar &prec) const 18 | { 19 | const typename internal::nested_eval::type actualA(derived()); 20 | typename internal::conditional::type, 22 | const PlainObject>::type actualB(other.derived()); 23 | 24 | return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm()); 25 | } 26 | 27 | } // end namespace Eigen 28 | 29 | #endif // EIGEN_SPARSE_FUZZY_H 30 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | internal::evaluator thisEval(derived()); 22 | for (Index j=0; j::InnerIterator iter(thisEval,j); iter; ++iter) 24 | res += iter.value(); 25 | return res; 26 | } 27 | 28 | template 29 | typename internal::traits >::Scalar 30 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 31 | { 32 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 33 | if(this->isCompressed()) 34 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 35 | else 36 | return Base::sum(); 37 | } 38 | 39 | template 40 | typename internal::traits >::Scalar 41 | SparseVector<_Scalar,_Options,_Index>::sum() const 42 | { 43 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 44 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 45 | } 46 | 47 | } // end namespace Eigen 48 | 49 | #endif // EIGEN_SPARSEREDUX_H 50 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/SparseLU/SparseLU_Utils.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | 11 | #ifndef EIGEN_SPARSELU_UTILS_H 12 | #define EIGEN_SPARSELU_UTILS_H 13 | 14 | namespace Eigen { 15 | namespace internal { 16 | 17 | /** 18 | * \brief Count Nonzero elements in the factors 19 | */ 20 | template 21 | void SparseLUImpl::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) 22 | { 23 | nnzL = 0; 24 | nnzU = (glu.xusub)(n); 25 | Index nsuper = (glu.supno)(n); 26 | Index jlen; 27 | Index i, j, fsupc; 28 | if (n <= 0 ) return; 29 | // For each supernode 30 | for (i = 0; i <= nsuper; i++) 31 | { 32 | fsupc = glu.xsup(i); 33 | jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); 34 | 35 | for (j = fsupc; j < glu.xsup(i+1); j++) 36 | { 37 | nnzL += jlen; 38 | nnzU += j - fsupc + 1; 39 | jlen--; 40 | } 41 | } 42 | } 43 | 44 | /** 45 | * \brief Fix up the data storage lsub for L-subscripts. 46 | * 47 | * It removes the subscripts sets for structural pruning, 48 | * and applies permutation to the remaining subscripts 49 | * 50 | */ 51 | template 52 | void SparseLUImpl::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu) 53 | { 54 | Index fsupc, i, j, k, jstart; 55 | 56 | StorageIndex nextl = 0; 57 | Index nsuper = (glu.supno)(n); 58 | 59 | // For each supernode 60 | for (i = 0; i <= nsuper; i++) 61 | { 62 | fsupc = glu.xsup(i); 63 | jstart = glu.xlsub(fsupc); 64 | glu.xlsub(fsupc) = nextl; 65 | for (j = jstart; j < glu.xlsub(fsupc + 1); j++) 66 | { 67 | glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A 68 | nextl++; 69 | } 70 | for (k = fsupc+1; k < glu.xsup(i+1); k++) 71 | glu.xlsub(k) = nextl; // other columns in supernode i 72 | } 73 | 74 | glu.xlsub(n) = nextl; 75 | } 76 | 77 | } // end namespace internal 78 | 79 | } // end namespace Eigen 80 | #endif // EIGEN_SPARSELU_UTILS_H 81 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/SparseLU/SparseLU_relax_snode.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | /* This file is a modified version of heap_relax_snode.c file in SuperLU 11 | * -- SuperLU routine (version 3.0) -- 12 | * Univ. of California Berkeley, Xerox Palo Alto Research Center, 13 | * and Lawrence Berkeley National Lab. 14 | * October 15, 2003 15 | * 16 | * Copyright (c) 1994 by Xerox Corporation. All rights reserved. 17 | * 18 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY 19 | * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 20 | * 21 | * Permission is hereby granted to use or copy this program for any 22 | * purpose, provided the above notices are retained on all copies. 23 | * Permission to modify the code and to distribute modified code is 24 | * granted, provided the above notices are retained, and a notice that 25 | * the code was modified is included with the above copyright notice. 26 | */ 27 | 28 | #ifndef SPARSELU_RELAX_SNODE_H 29 | #define SPARSELU_RELAX_SNODE_H 30 | 31 | namespace Eigen { 32 | 33 | namespace internal { 34 | 35 | /** 36 | * \brief Identify the initial relaxed supernodes 37 | * 38 | * This routine is applied to a column elimination tree. 39 | * It assumes that the matrix has been reordered according to the postorder of the etree 40 | * \param n the number of columns 41 | * \param et elimination tree 42 | * \param relax_columns Maximum number of columns allowed in a relaxed snode 43 | * \param descendants Number of descendants of each node in the etree 44 | * \param relax_end last column in a supernode 45 | */ 46 | template 47 | void SparseLUImpl::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end) 48 | { 49 | 50 | // compute the number of descendants of each node in the etree 51 | Index parent; 52 | relax_end.setConstant(emptyIdxLU); 53 | descendants.setZero(); 54 | for (Index j = 0; j < n; j++) 55 | { 56 | parent = et(j); 57 | if (parent != n) // not the dummy root 58 | descendants(parent) += descendants(j) + 1; 59 | } 60 | // Identify the relaxed supernodes by postorder traversal of the etree 61 | Index snode_start; // beginning of a snode 62 | for (Index j = 0; j < n; ) 63 | { 64 | parent = et(j); 65 | snode_start = j; 66 | while ( parent != n && descendants(parent) < relax_columns ) 67 | { 68 | j = parent; 69 | parent = et(j); 70 | } 71 | // Found a supernode in postordered etree, j is the last column 72 | relax_end(snode_start) = StorageIndex(j); // Record last column 73 | j++; 74 | // Search for a new leaf 75 | while (descendants(j) != 0 && j < n) j++; 76 | } // End postorder traversal of the etree 77 | 78 | } 79 | 80 | } // end namespace internal 81 | 82 | } // end namespace Eigen 83 | #endif 84 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/StlSupport/details.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STL_DETAILS_H 12 | #define EIGEN_STL_DETAILS_H 13 | 14 | #ifndef EIGEN_ALIGNED_ALLOCATOR 15 | #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator 16 | #endif 17 | 18 | namespace Eigen { 19 | 20 | // This one is needed to prevent reimplementing the whole std::vector. 21 | template 22 | class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR 23 | { 24 | public: 25 | typedef std::size_t size_type; 26 | typedef std::ptrdiff_t difference_type; 27 | typedef T* pointer; 28 | typedef const T* const_pointer; 29 | typedef T& reference; 30 | typedef const T& const_reference; 31 | typedef T value_type; 32 | 33 | template 34 | struct rebind 35 | { 36 | typedef aligned_allocator_indirection other; 37 | }; 38 | 39 | aligned_allocator_indirection() {} 40 | aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} 41 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 42 | template 43 | aligned_allocator_indirection(const aligned_allocator_indirection& ) {} 44 | template 45 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 46 | ~aligned_allocator_indirection() {} 47 | }; 48 | 49 | #if EIGEN_COMP_MSVC 50 | 51 | // sometimes, MSVC detects, at compile time, that the argument x 52 | // in std::vector::resize(size_t s,T x) won't be aligned and generate an error 53 | // even if this function is never called. Whence this little wrapper. 54 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \ 55 | typename Eigen::internal::conditional< \ 56 | Eigen::internal::is_arithmetic::value, \ 57 | T, \ 58 | Eigen::internal::workaround_msvc_stl_support \ 59 | >::type 60 | 61 | namespace internal { 62 | template struct workaround_msvc_stl_support : public T 63 | { 64 | inline workaround_msvc_stl_support() : T() {} 65 | inline workaround_msvc_stl_support(const T& other) : T(other) {} 66 | inline operator T& () { return *static_cast(this); } 67 | inline operator const T& () const { return *static_cast(this); } 68 | template 69 | inline T& operator=(const OtherT& other) 70 | { T::operator=(other); return *this; } 71 | inline workaround_msvc_stl_support& operator=(const workaround_msvc_stl_support& other) 72 | { T::operator=(other); return *this; } 73 | }; 74 | } 75 | 76 | #else 77 | 78 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T 79 | 80 | #endif 81 | 82 | } 83 | 84 | #endif // EIGEN_STL_DETAILS_H 85 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/misc/Image.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MISC_IMAGE_H 11 | #define EIGEN_MISC_IMAGE_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class image_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix< 25 | typename MatrixType::Scalar, 26 | MatrixType::RowsAtCompileTime, // the image is a subspace of the destination space, whose 27 | // dimension is the number of rows of the original matrix 28 | Dynamic, // we don't know at compile time the dimension of the image (the rank) 29 | MatrixType::Options, 30 | MatrixType::MaxRowsAtCompileTime, // the image matrix will consist of columns from the original matrix, 31 | MatrixType::MaxColsAtCompileTime // so it has the same number of rows and at most as many columns. 32 | > ReturnType; 33 | }; 34 | 35 | template struct image_retval_base 36 | : public ReturnByValue > 37 | { 38 | typedef _DecompositionType DecompositionType; 39 | typedef typename DecompositionType::MatrixType MatrixType; 40 | typedef ReturnByValue Base; 41 | 42 | image_retval_base(const DecompositionType& dec, const MatrixType& originalMatrix) 43 | : m_dec(dec), m_rank(dec.rank()), 44 | m_cols(m_rank == 0 ? 1 : m_rank), 45 | m_originalMatrix(originalMatrix) 46 | {} 47 | 48 | inline Index rows() const { return m_dec.rows(); } 49 | inline Index cols() const { return m_cols; } 50 | inline Index rank() const { return m_rank; } 51 | inline const DecompositionType& dec() const { return m_dec; } 52 | inline const MatrixType& originalMatrix() const { return m_originalMatrix; } 53 | 54 | template inline void evalTo(Dest& dst) const 55 | { 56 | static_cast*>(this)->evalTo(dst); 57 | } 58 | 59 | protected: 60 | const DecompositionType& m_dec; 61 | Index m_rank, m_cols; 62 | const MatrixType& m_originalMatrix; 63 | }; 64 | 65 | } // end namespace internal 66 | 67 | #define EIGEN_MAKE_IMAGE_HELPERS(DecompositionType) \ 68 | typedef typename DecompositionType::MatrixType MatrixType; \ 69 | typedef typename MatrixType::Scalar Scalar; \ 70 | typedef typename MatrixType::RealScalar RealScalar; \ 71 | typedef Eigen::internal::image_retval_base Base; \ 72 | using Base::dec; \ 73 | using Base::originalMatrix; \ 74 | using Base::rank; \ 75 | using Base::rows; \ 76 | using Base::cols; \ 77 | image_retval(const DecompositionType& dec, const MatrixType& originalMatrix) \ 78 | : Base(dec, originalMatrix) {} 79 | 80 | } // end namespace Eigen 81 | 82 | #endif // EIGEN_MISC_IMAGE_H 83 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/misc/Kernel.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_MISC_KERNEL_H 11 | #define EIGEN_MISC_KERNEL_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class kernel_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix< 25 | typename MatrixType::Scalar, 26 | MatrixType::ColsAtCompileTime, // the number of rows in the "kernel matrix" 27 | // is the number of cols of the original matrix 28 | // so that the product "matrix * kernel = zero" makes sense 29 | Dynamic, // we don't know at compile-time the dimension of the kernel 30 | MatrixType::Options, 31 | MatrixType::MaxColsAtCompileTime, // see explanation for 2nd template parameter 32 | MatrixType::MaxColsAtCompileTime // the kernel is a subspace of the domain space, 33 | // whose dimension is the number of columns of the original matrix 34 | > ReturnType; 35 | }; 36 | 37 | template struct kernel_retval_base 38 | : public ReturnByValue > 39 | { 40 | typedef _DecompositionType DecompositionType; 41 | typedef ReturnByValue Base; 42 | 43 | explicit kernel_retval_base(const DecompositionType& dec) 44 | : m_dec(dec), 45 | m_rank(dec.rank()), 46 | m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank) 47 | {} 48 | 49 | inline Index rows() const { return m_dec.cols(); } 50 | inline Index cols() const { return m_cols; } 51 | inline Index rank() const { return m_rank; } 52 | inline const DecompositionType& dec() const { return m_dec; } 53 | 54 | template inline void evalTo(Dest& dst) const 55 | { 56 | static_cast*>(this)->evalTo(dst); 57 | } 58 | 59 | protected: 60 | const DecompositionType& m_dec; 61 | Index m_rank, m_cols; 62 | }; 63 | 64 | } // end namespace internal 65 | 66 | #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \ 67 | typedef typename DecompositionType::MatrixType MatrixType; \ 68 | typedef typename MatrixType::Scalar Scalar; \ 69 | typedef typename MatrixType::RealScalar RealScalar; \ 70 | typedef Eigen::internal::kernel_retval_base Base; \ 71 | using Base::dec; \ 72 | using Base::rank; \ 73 | using Base::rows; \ 74 | using Base::cols; \ 75 | kernel_retval(const DecompositionType& dec) : Base(dec) {} 76 | 77 | } // end namespace Eigen 78 | 79 | #endif // EIGEN_MISC_KERNEL_H 80 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/misc/RealSvd2x2.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2010 Benoit Jacob 5 | // Copyright (C) 2013-2016 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_REALSVD2X2_H 12 | #define EIGEN_REALSVD2X2_H 13 | 14 | namespace Eigen { 15 | 16 | namespace internal { 17 | 18 | template 19 | void real_2x2_jacobi_svd(const MatrixType& matrix, Index p, Index q, 20 | JacobiRotation *j_left, 21 | JacobiRotation *j_right) 22 | { 23 | using std::sqrt; 24 | using std::abs; 25 | Matrix m; 26 | m << numext::real(matrix.coeff(p,p)), numext::real(matrix.coeff(p,q)), 27 | numext::real(matrix.coeff(q,p)), numext::real(matrix.coeff(q,q)); 28 | JacobiRotation rot1; 29 | RealScalar t = m.coeff(0,0) + m.coeff(1,1); 30 | RealScalar d = m.coeff(1,0) - m.coeff(0,1); 31 | 32 | if(abs(d) < (std::numeric_limits::min)()) 33 | { 34 | rot1.s() = RealScalar(0); 35 | rot1.c() = RealScalar(1); 36 | } 37 | else 38 | { 39 | // If d!=0, then t/d cannot overflow because the magnitude of the 40 | // entries forming d are not too small compared to the ones forming t. 41 | RealScalar u = t / d; 42 | RealScalar tmp = sqrt(RealScalar(1) + numext::abs2(u)); 43 | rot1.s() = RealScalar(1) / tmp; 44 | rot1.c() = u / tmp; 45 | } 46 | m.applyOnTheLeft(0,1,rot1); 47 | j_right->makeJacobi(m,0,1); 48 | *j_left = rot1 * j_right->transpose(); 49 | } 50 | 51 | } // end namespace internal 52 | 53 | } // end namespace Eigen 54 | 55 | #endif // EIGEN_REALSVD2X2_H 56 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/misc/lapacke_mangling.h: -------------------------------------------------------------------------------- 1 | #ifndef LAPACK_HEADER_INCLUDED 2 | #define LAPACK_HEADER_INCLUDED 3 | 4 | #ifndef LAPACK_GLOBAL 5 | #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) 6 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 7 | #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) 8 | #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME 9 | #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) 10 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname 11 | #else 12 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 13 | #endif 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /ThirdPartyDependence/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is included into the body of the base classes supporting matrix specific coefficient-wise functions. 12 | // This include MatrixBase and SparseMatrixBase. 13 | 14 | 15 | typedef CwiseUnaryOp, const Derived> CwiseAbsReturnType; 16 | typedef CwiseUnaryOp, const Derived> CwiseAbs2ReturnType; 17 | typedef CwiseUnaryOp, const Derived> CwiseSqrtReturnType; 18 | typedef CwiseUnaryOp, const Derived> CwiseSignReturnType; 19 | typedef CwiseUnaryOp, const Derived> CwiseInverseReturnType; 20 | 21 | /// \returns an expression of the coefficient-wise absolute value of \c *this 22 | /// 23 | /// Example: \include MatrixBase_cwiseAbs.cpp 24 | /// Output: \verbinclude MatrixBase_cwiseAbs.out 25 | /// 26 | EIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value) 27 | /// 28 | /// \sa cwiseAbs2() 29 | /// 30 | EIGEN_DEVICE_FUNC 31 | EIGEN_STRONG_INLINE const CwiseAbsReturnType 32 | cwiseAbs() const { return CwiseAbsReturnType(derived()); } 33 | 34 | /// \returns an expression of the coefficient-wise squared absolute value of \c *this 35 | /// 36 | /// Example: \include MatrixBase_cwiseAbs2.cpp 37 | /// Output: \verbinclude MatrixBase_cwiseAbs2.out 38 | /// 39 | EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value) 40 | /// 41 | /// \sa cwiseAbs() 42 | /// 43 | EIGEN_DEVICE_FUNC 44 | EIGEN_STRONG_INLINE const CwiseAbs2ReturnType 45 | cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); } 46 | 47 | /// \returns an expression of the coefficient-wise square root of *this. 48 | /// 49 | /// Example: \include MatrixBase_cwiseSqrt.cpp 50 | /// Output: \verbinclude MatrixBase_cwiseSqrt.out 51 | /// 52 | EIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root) 53 | /// 54 | /// \sa cwisePow(), cwiseSquare() 55 | /// 56 | EIGEN_DEVICE_FUNC 57 | inline const CwiseSqrtReturnType 58 | cwiseSqrt() const { return CwiseSqrtReturnType(derived()); } 59 | 60 | /// \returns an expression of the coefficient-wise signum of *this. 61 | /// 62 | /// Example: \include MatrixBase_cwiseSign.cpp 63 | /// Output: \verbinclude MatrixBase_cwiseSign.out 64 | /// 65 | EIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function) 66 | /// 67 | EIGEN_DEVICE_FUNC 68 | inline const CwiseSignReturnType 69 | cwiseSign() const { return CwiseSignReturnType(derived()); } 70 | 71 | 72 | /// \returns an expression of the coefficient-wise inverse of *this. 73 | /// 74 | /// Example: \include MatrixBase_cwiseInverse.cpp 75 | /// Output: \verbinclude MatrixBase_cwiseInverse.out 76 | /// 77 | EIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse) 78 | /// 79 | /// \sa cwiseProduct() 80 | /// 81 | EIGEN_DEVICE_FUNC 82 | inline const CwiseInverseReturnType 83 | cwiseInverse() const { return CwiseInverseReturnType(derived()); } 84 | 85 | 86 | -------------------------------------------------------------------------------- /ThirdPartyDependence/PQPLib/Build.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************\ 2 | 3 | Copyright 1999 The University of North Carolina at Chapel Hill. 4 | All Rights Reserved. 5 | 6 | Permission to use, copy, modify and distribute this software and its 7 | documentation for educational, research and non-profit purposes, without 8 | fee, and without a written agreement is hereby granted, provided that the 9 | above copyright notice and the following three paragraphs appear in all 10 | copies. 11 | 12 | IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE 13 | LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 14 | CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE 15 | USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY 16 | OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | DAMAGES. 18 | 19 | THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 22 | PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 23 | NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, 24 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 25 | 26 | The authors may be contacted via: 27 | 28 | US Mail: S. Gottschalk, E. Larsen 29 | Department of Computer Science 30 | Sitterson Hall, CB #3175 31 | University of N. Carolina 32 | Chapel Hill, NC 27599-3175 33 | 34 | Phone: (919)962-1749 35 | 36 | EMail: geom@cs.unc.edu 37 | 38 | 39 | \**************************************************************************/ 40 | 41 | #ifndef PQP_BUILD_H 42 | #define PQP_BUILD_H 43 | 44 | #include "PQP.h" 45 | 46 | int 47 | build_model(PQP_Model *m); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ThirdPartyDependence/PQPLib/GetTime.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************\ 2 | 3 | Copyright 1999 The University of North Carolina at Chapel Hill. 4 | All Rights Reserved. 5 | 6 | Permission to use, copy, modify and distribute this software and its 7 | documentation for educational, research and non-profit purposes, without 8 | fee, and without a written agreement is hereby granted, provided that the 9 | above copyright notice and the following three paragraphs appear in all 10 | copies. 11 | 12 | IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE 13 | LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 14 | CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE 15 | USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY 16 | OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | DAMAGES. 18 | 19 | THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 22 | PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 23 | NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, 24 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 25 | 26 | The authors may be contacted via: 27 | 28 | US Mail: S. Gottschalk, E. Larsen 29 | Department of Computer Science 30 | Sitterson Hall, CB #3175 31 | University of N. Carolina 32 | Chapel Hill, NC 27599-3175 33 | 34 | Phone: (919)962-1749 35 | 36 | EMail: geom@cs.unc.edu 37 | 38 | 39 | \**************************************************************************/ 40 | 41 | #ifndef PQP_GETTIME_H 42 | #define PQP_GETTIME_H 43 | 44 | #define WIN32 true 45 | 46 | #ifdef WIN32 47 | 48 | #include 49 | inline 50 | double 51 | GetTime() 52 | { 53 | return (double)(clock()); 54 | } 55 | 56 | #else 57 | 58 | #include 59 | inline 60 | double 61 | GetTime() 62 | { 63 | struct timeval thistime; 64 | gettimeofday(&thistime, 0); 65 | return (thistime.tv_sec + thistime.tv_usec * 1e-6); 66 | } 67 | 68 | #endif 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /ThirdPartyDependence/PQPLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | //******************************************************************************************* 2 | //* 3 | //* This folder contains the code that is extended from the basic PQP library 4 | //* by adding the following functions: 5 | //* 6 | //* 1) find the closest point on a given mesh 7 | //* 2) also find the triangle on the given mesh which contains the closest point 8 | //* 9 | //******************************************************************************************* 10 | // 11 | // The following gives an example about how to use this extended PQP library 12 | // 13 | 14 | #include "PQP/include/PQP.h" 15 | 16 | float MinimalDistance(float x, float y, float z) 17 | { 18 | //------------------------------------------------------------------ 19 | // build PQP model 20 | //------------------------------------------------------------------ 21 | PQP_Model *m_pqp_model1 = new PQP_Model(); 22 | m_pqp_model1->BeginModel(); 23 | int i; 24 | PQP_REAL p1[3], p2[3], p3[3]; 25 | for(i = 0; i< m_inMesh->face_N; i++) 26 | { 27 | int vid = m_inMesh->face[i][0]; 28 | p1[0] = (PQP_REAL)(m_inMesh->vertex[vid][0]); 29 | p1[1] = (PQP_REAL)(m_inMesh->vertex[vid][1]); 30 | p1[2] = (PQP_REAL)(m_inMesh->vertex[vid][2]); 31 | vid = m_inMesh->face[i][1]; 32 | p2[0] = (PQP_REAL)(m_inMesh->vertex[vid][0]); 33 | p2[1] = (PQP_REAL)(m_inMesh->vertex[vid][1]); 34 | p2[2] = (PQP_REAL)(m_inMesh->vertex[vid][2]); 35 | vid = m_inMesh->face[i][2]; 36 | p3[0] = (PQP_REAL)(m_inMesh->vertex[vid][0]); 37 | p3[1] = (PQP_REAL)(m_inMesh->vertex[vid][1]); 38 | p3[2] = (PQP_REAL)(m_inMesh->vertex[vid][2]); 39 | m_pqp_model1->AddTri(p1,p2,p3,i); 40 | } 41 | m_pqp_model1->EndModel(); 42 | 43 | 44 | //------------------------------------------------------------------ 45 | // compute minimal distance 46 | //------------------------------------------------------------------ 47 | PQP_DistanceResult dres; dres.last_tri = m_pqp_model1->last_tri; 48 | PQP_REAL p[3]; 49 | p[0] = x; p[1] = y; p[2] = z; 50 | PQP_Distance(&dres,m_pqp_model1,p,0.0,0.0); 51 | 52 | float closestPt[3]; // closest point 53 | closestPt[0] = dres.p1[0]; closestPt[1] = dres.p1[1]; closestPt[2] = dres.p1[2]; 54 | 55 | int minTriId = dres.last_tri->id; // closest triangle - note that ID index starts from zero 56 | 57 | float minDist = dres.Distance(); // minimal distance 58 | 59 | 60 | 61 | //------------------------------------------------------------------ 62 | // free memory 63 | //------------------------------------------------------------------ 64 | delete m_pqp_model1; 65 | 66 | return minDist; 67 | } -------------------------------------------------------------------------------- /ThirdPartyDependence/PQPLib/Tri.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************\ 2 | 3 | Copyright 1999 The University of North Carolina at Chapel Hill. 4 | All Rights Reserved. 5 | 6 | Permission to use, copy, modify and distribute this software and its 7 | documentation for educational, research and non-profit purposes, without 8 | fee, and without a written agreement is hereby granted, provided that the 9 | above copyright notice and the following three paragraphs appear in all 10 | copies. 11 | 12 | IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE 13 | LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 14 | CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE 15 | USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY 16 | OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | DAMAGES. 18 | 19 | THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 22 | PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 23 | NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, 24 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 25 | 26 | The authors may be contacted via: 27 | 28 | US Mail: S. Gottschalk 29 | Department of Computer Science 30 | Sitterson Hall, CB #3175 31 | University of N. Carolina 32 | Chapel Hill, NC 27599-3175 33 | 34 | Phone: (919)962-1749 35 | 36 | EMail: geom@cs.unc.edu 37 | 38 | 39 | \**************************************************************************/ 40 | 41 | #ifndef PQP_TRI_H 42 | #define PQP_TRI_H 43 | 44 | #include "PQP_Compile.h" 45 | #define USING_MESH_MODEL1 46 | #ifndef USING_MESH_MODEL 47 | #define USING_POLYGONSOUP 48 | #endif 49 | struct Tri 50 | { 51 | #ifdef USING_POLYGONSOUP 52 | PQP_REAL p1[3]; 53 | PQP_REAL p2[3]; 54 | PQP_REAL p3[3]; 55 | #endif 56 | int id; 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /ThirdPartyDependence/PQPLib/TriDist.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************\ 2 | 3 | Copyright 1999 The University of North Carolina at Chapel Hill. 4 | All Rights Reserved. 5 | 6 | Permission to use, copy, modify and distribute this software and its 7 | documentation for educational, research and non-profit purposes, without 8 | fee, and without a written agreement is hereby granted, provided that the 9 | above copyright notice and the following three paragraphs appear in all 10 | copies. 11 | 12 | IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE 13 | LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 14 | CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE 15 | USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY 16 | OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 | DAMAGES. 18 | 19 | THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 22 | PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 23 | NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, 24 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 25 | 26 | The authors may be contacted via: 27 | 28 | US Mail: E. Larsen 29 | Department of Computer Science 30 | Sitterson Hall, CB #3175 31 | University of N. Carolina 32 | Chapel Hill, NC 27599-3175 33 | 34 | Phone: (919)962-1749 35 | 36 | EMail: geom@cs.unc.edu 37 | 38 | 39 | \**************************************************************************/ 40 | 41 | #ifndef PQP_TRIDIST_H 42 | #define PQP_TRIDIST_H 43 | 44 | #include "PQP_Compile.h" 45 | 46 | // TriDist() 47 | // 48 | // computes the closest points on two triangles, and returns the 49 | // distance between them. 50 | // 51 | // s and t are the triangles, stored tri[point][dimension]. 52 | // 53 | // If the triangles are disjoint, p and q give the closest points of 54 | // s and t respectively. However, if the triangles overlap, p and q 55 | // are basically a random pair of points from the triangles, not 56 | // coincident points on the intersection of the triangles, as might 57 | // be expected. 58 | 59 | PQP_REAL 60 | TriDist(PQP_REAL p[3], PQP_REAL q[3], 61 | const PQP_REAL s[3][3], const PQP_REAL t[3][3]); 62 | 63 | //------------------------------------------------------------------ 64 | PQP_REAL 65 | PointTriDist(int *posFlag, PQP_REAL q[3], const PQP_REAL p[3], const PQP_REAL t[3][3]); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/GlAux.Lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/GlAux.Lib -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/GlU32.Lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/GlU32.Lib -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/OpenGL32.Lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/OpenGL32.Lib -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glew32.dll -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glew32.lib -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glew32d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glew32d.dll -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glew32d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glew32d.lib -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glut.def: -------------------------------------------------------------------------------- 1 | DESCRIPTION 'OpenGL Utility Toolkit for Win32' 2 | 3 | VERSION 3.7 4 | 5 | EXPORTS 6 | 7 | glutAddMenuEntry 8 | glutAddSubMenu 9 | glutAttachMenu 10 | glutBitmapCharacter 11 | glutBitmapLength 12 | glutBitmapWidth 13 | glutButtonBoxFunc 14 | glutChangeToMenuEntry 15 | glutChangeToSubMenu 16 | glutCopyColormap 17 | glutCreateMenu 18 | __glutCreateMenuWithExit 19 | glutCreateSubWindow 20 | glutCreateWindow 21 | __glutCreateWindowWithExit 22 | glutDestroyMenu 23 | glutDestroyWindow 24 | glutDetachMenu 25 | glutDeviceGet 26 | glutDialsFunc 27 | glutDisplayFunc 28 | glutEnterGameMode 29 | glutEntryFunc 30 | glutEstablishOverlay 31 | glutExtensionSupported 32 | glutForceJoystickFunc 33 | glutFullScreen 34 | glutGameModeGet 35 | glutGameModeString 36 | glutGet 37 | glutGetColor 38 | glutGetMenu 39 | glutGetModifiers 40 | glutGetWindow 41 | glutHideOverlay 42 | glutHideWindow 43 | glutIconifyWindow 44 | glutIdleFunc 45 | glutIgnoreKeyRepeat 46 | glutInit 47 | __glutInitWithExit 48 | glutInitDisplayMode 49 | glutInitDisplayString 50 | glutInitWindowPosition 51 | glutInitWindowSize 52 | glutJoystickFunc 53 | glutKeyboardFunc 54 | glutKeyboardUpFunc 55 | glutLayerGet 56 | glutLeaveGameMode 57 | glutMainLoop 58 | glutMenuStateFunc 59 | glutMenuStatusFunc 60 | glutMotionFunc 61 | glutMouseFunc 62 | glutOverlayDisplayFunc 63 | glutPassiveMotionFunc 64 | glutPopWindow 65 | glutPositionWindow 66 | glutPostOverlayRedisplay 67 | glutPostRedisplay 68 | glutPostWindowOverlayRedisplay 69 | glutPostWindowRedisplay 70 | glutPushWindow 71 | glutRemoveMenuItem 72 | glutRemoveOverlay 73 | glutReportErrors 74 | glutReshapeFunc 75 | glutReshapeWindow 76 | glutSetColor 77 | glutSetCursor 78 | glutSetIconTitle 79 | glutSetKeyRepeat 80 | glutSetMenu 81 | glutSetWindow 82 | glutSetWindowTitle 83 | glutSetupVideoResizing 84 | glutShowOverlay 85 | glutShowWindow 86 | glutSolidCone 87 | glutSolidCube 88 | glutSolidDodecahedron 89 | glutSolidIcosahedron 90 | glutSolidOctahedron 91 | glutSolidSphere 92 | glutSolidTeapot 93 | glutSolidTetrahedron 94 | glutSolidTorus 95 | glutSpaceballButtonFunc 96 | glutSpaceballMotionFunc 97 | glutSpaceballRotateFunc 98 | glutSpecialFunc 99 | glutSpecialUpFunc 100 | glutStopVideoResizing 101 | glutStrokeCharacter 102 | glutStrokeLength 103 | glutStrokeWidth 104 | glutSwapBuffers 105 | glutTabletButtonFunc 106 | glutTabletMotionFunc 107 | glutTimerFunc 108 | glutUseLayer 109 | glutVideoPan 110 | glutVideoResize 111 | glutVideoResizeGet 112 | glutVisibilityFunc 113 | glutWarpPointer 114 | glutWindowStatusFunc 115 | glutWireCone 116 | glutWireCube 117 | glutWireDodecahedron 118 | glutWireIcosahedron 119 | glutWireOctahedron 120 | glutWireSphere 121 | glutWireTeapot 122 | glutWireTetrahedron 123 | glutWireTorus 124 | ; __glutSetFCB 125 | ; __glutGetFCB 126 | 127 | -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glut32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glut32.dll -------------------------------------------------------------------------------- /ThirdPartyDependence/glut/glut32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GuoxinFang/MultiAxis3DPrinting_ToolpathGenerator/a4a140be8bd04abeab5e7b3d894dcceeb2839990/ThirdPartyDependence/glut/glut32.lib --------------------------------------------------------------------------------