|
| 1 | +Notebook[{ |
| 2 | +Cell[BoxData[ |
| 3 | + RowBox[{ |
| 4 | + RowBox[{"(*", " ", |
| 5 | + RowBox[{"Use", " ", "development", " ", |
| 6 | + RowBox[{"version", "."}]}], " ", "*)"}], "\[IndentingNewLine]", |
| 7 | + RowBox[{"PacletDirectoryAdd", "@", |
| 8 | + RowBox[{"ParentDirectory", "[", |
| 9 | + RowBox[{"NotebookDirectory", "[", "]"}], "]"}]}]}]], "Input", |
| 10 | + CellLabel->"In[39]:=",ExpressionUUID->"98a181c1-8163-4c70-bacc-491151bba889"], |
| 11 | + |
| 12 | +Cell[BoxData[ |
| 13 | + RowBox[{"Get", "[", "\"\<ImportMesh`\>\"", "]"}]], "Input", |
| 14 | + CellLabel->"In[40]:=",ExpressionUUID->"4ae1c006-c270-4eb3-a2e1-221f467b368d"], |
| 15 | + |
| 16 | +Cell[CellGroupData[{ |
| 17 | + |
| 18 | +Cell["Examples for README", \ |
| 19 | +"Subsection",ExpressionUUID->"5e6f7ba2-d840-4c47-b2d7-ad0017ea45d5"], |
| 20 | + |
| 21 | +Cell[CellGroupData[{ |
| 22 | + |
| 23 | +Cell["Example 1", \ |
| 24 | +"Subsubsection",ExpressionUUID->"7876bf11-4683-44bd-a88b-01459ea471a6"], |
| 25 | + |
| 26 | +Cell[BoxData[{ |
| 27 | + RowBox[{ |
| 28 | + RowBox[{ |
| 29 | + "$repoURL", "=", |
| 30 | + "\"\<https://raw.githubusercontent.com/c3m-labs/ImportMesh/master\>\""}], |
| 31 | + ";"}], "\[IndentingNewLine]", |
| 32 | + RowBox[{"file", "=", |
| 33 | + RowBox[{"URLDownload", "@", |
| 34 | + RowBox[{"(", |
| 35 | + RowBox[{"$repoURL", "<>", "\"\</Tests/Gmsh/Hex8_box.msh\>\""}], |
| 36 | + ")"}]}]}]}], "Input", |
| 37 | + CellLabel->"In[41]:=",ExpressionUUID->"dd54356e-e791-4246-8a59-9f7ef307bc52"], |
| 38 | + |
| 39 | +Cell[BoxData[{ |
| 40 | + RowBox[{ |
| 41 | + RowBox[{"mesh", "=", |
| 42 | + RowBox[{"Import", "[", |
| 43 | + RowBox[{"file", ",", "\"\<ElementMesh\>\""}], "]"}]}], |
| 44 | + ";"}], "\[IndentingNewLine]", |
| 45 | + RowBox[{"pic", "=", |
| 46 | + RowBox[{"mesh", "[", |
| 47 | + RowBox[{"\"\<Wireframe\>\"", "[", |
| 48 | + RowBox[{ |
| 49 | + RowBox[{"\"\<MeshElementStyle\>\"", "\[Rule]", |
| 50 | + RowBox[{"FaceForm", "@", "LightBlue"}]}], ",", |
| 51 | + RowBox[{"ImageSize", "\[Rule]", |
| 52 | + RowBox[{"{", |
| 53 | + RowBox[{"600", ",", "200"}], "}"}]}]}], "]"}], "]"}]}]}], "Input", |
| 54 | + CellLabel->"In[43]:=",ExpressionUUID->"40a2695b-63b2-47b0-93db-294470cdb724"], |
| 55 | + |
| 56 | +Cell[BoxData[ |
| 57 | + RowBox[{"Export", "[", "\[IndentingNewLine]", |
| 58 | + RowBox[{ |
| 59 | + RowBox[{"FileNameJoin", "[", |
| 60 | + RowBox[{"{", |
| 61 | + RowBox[{ |
| 62 | + RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\<Example1.png\>\""}], |
| 63 | + "}"}], "]"}], ",", "\[IndentingNewLine]", "pic"}], "\[IndentingNewLine]", |
| 64 | + "]"}]], "Input", |
| 65 | + CellLabel->"In[45]:=",ExpressionUUID->"429474c0-1d91-468f-bbbc-b5d82a771ce6"] |
| 66 | +}, Open ]], |
| 67 | + |
| 68 | +Cell[CellGroupData[{ |
| 69 | + |
| 70 | +Cell["Example 2", \ |
| 71 | +"Subsubsection",ExpressionUUID->"58767b91-a7e3-40a3-8c41-979463a2a5fa"], |
| 72 | + |
| 73 | +Cell[BoxData[ |
| 74 | + RowBox[{ |
| 75 | + RowBox[{"inputText", "=", |
| 76 | + RowBox[{"ReadString", "@", |
| 77 | + RowBox[{"(", |
| 78 | + RowBox[{"$repoURL", "<>", "\"\</Tests/Abaqus/Quad4_annulus.inp\>\""}], |
| 79 | + ")"}]}]}], ";"}]], "Input", |
| 80 | + CellLabel->"In[46]:=",ExpressionUUID->"7a6c9fc4-cc22-4c5b-9607-806a2970f2a0"], |
| 81 | + |
| 82 | +Cell[BoxData[{ |
| 83 | + RowBox[{ |
| 84 | + RowBox[{"mesh", "=", |
| 85 | + RowBox[{"ImportString", "[", |
| 86 | + RowBox[{"inputText", ",", "\"\<AbaqusMesh\>\""}], "]"}]}], |
| 87 | + ";"}], "\[IndentingNewLine]", |
| 88 | + RowBox[{"pic", "=", |
| 89 | + RowBox[{"mesh", "[", |
| 90 | + RowBox[{"\"\<Wireframe\>\"", "[", |
| 91 | + RowBox[{ |
| 92 | + RowBox[{"\"\<MeshElementStyle\>\"", "\[Rule]", |
| 93 | + RowBox[{"FaceForm", "@", "LightBlue"}]}], ",", |
| 94 | + RowBox[{"ImageSize", "\[Rule]", |
| 95 | + RowBox[{"{", |
| 96 | + RowBox[{"600", ",", "200"}], "}"}]}]}], "]"}], "]"}]}]}], "Input", |
| 97 | + CellLabel->"In[47]:=",ExpressionUUID->"aff3a765-208c-41a1-92c0-31890d1fb3cc"], |
| 98 | + |
| 99 | +Cell[BoxData[ |
| 100 | + RowBox[{"Export", "[", "\[IndentingNewLine]", |
| 101 | + RowBox[{ |
| 102 | + RowBox[{"FileNameJoin", "[", |
| 103 | + RowBox[{"{", |
| 104 | + RowBox[{ |
| 105 | + RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\<Example2.png\>\""}], |
| 106 | + "}"}], "]"}], ",", "\[IndentingNewLine]", "pic"}], "\[IndentingNewLine]", |
| 107 | + "]"}]], "Input", |
| 108 | + CellLabel->"In[49]:=",ExpressionUUID->"541bad0d-678d-45ae-83a8-c19c16bccbde"], |
| 109 | + |
| 110 | +Cell[BoxData[ |
| 111 | + RowBox[{"ImportString", "[", |
| 112 | + RowBox[{"inputText", ",", |
| 113 | + RowBox[{"{", |
| 114 | + RowBox[{"\"\<AbaqusMesh\>\"", ",", "\"\<Elements\>\""}], "}"}]}], |
| 115 | + "]"}]], "Input", |
| 116 | + CellLabel->"In[50]:=",ExpressionUUID->"1c05be40-31f8-4407-ae3c-1385c0ae97fb"], |
| 117 | + |
| 118 | +Cell[BoxData[ |
| 119 | + RowBox[{"ImportString", "[", |
| 120 | + RowBox[{"inputText", ",", |
| 121 | + RowBox[{"{", |
| 122 | + RowBox[{"\"\<AbaqusMesh\>\"", ",", "\"\<MeshNodes\>\""}], "}"}]}], |
| 123 | + "]"}]], "Input", |
| 124 | + CellLabel->"In[51]:=",ExpressionUUID->"51aa3b03-18c2-44ba-843a-d5e564f35b1b"] |
| 125 | +}, Open ]] |
| 126 | +}, Open ]] |
| 127 | +}, |
| 128 | +WindowSize->{958, 1086}, |
| 129 | +WindowMargins->{{Automatic, -8}, {Automatic, 0}}, |
| 130 | +PrivateNotebookOptions->{"FileOutlineCache"->False}, |
| 131 | +FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)", |
| 132 | +StyleDefinitions->"Default.nb" |
| 133 | +] |
| 134 | + |
0 commit comments