簡體   English   中英

有沒有類似圖片的github自述文件中的STL文件?

[英]Is there anyway to view a STL file in a github readme similar to an image?

你好,我正在嘗試在 README 文件中顯示來自我的 github 存儲庫的 STL 文件的預覽,是否可以這樣做? 到目前為止,我已經嘗試使用
<script src="https://embed.github.com/view/3d/<username>/<repo>/<ref>/<path_to_file>"></script>
例如我的文件是
<script src="https://github.com/view/3d/UNCG-DAISY/SediNetCam/blob/main/hardware/cameracover.stl"></script>

現在,Github 渲染 STL,在代碼塊中插入 ASCII 代碼並突出顯示語法

https://docs.github.com/en/enterprise-cloud@latest/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams

```stl
solid cube_corner
  facet normal 0.0 -1.0 0.0
    outer loop
      vertex 0.0 0.0 0.0
      vertex 1.0 0.0 0.0
      vertex 0.0 0.0 1.0
    endloop
  endfacet
  facet normal 0.0 0.0 -1.0
    outer loop
      vertex 0.0 0.0 0.0
      vertex 0.0 1.0 0.0
      vertex 1.0 0.0 0.0
    endloop
  endfacet
  facet normal -1.0 0.0 0.0
    outer loop
      vertex 0.0 0.0 0.0
      vertex 0.0 0.0 1.0
      vertex 0.0 1.0 0.0
    endloop
  endfacet
  facet normal 0.577 0.577 0.577
    outer loop
      vertex 1.0 0.0 0.0
      vertex 0.0 1.0 0.0
      vertex 0.0 0.0 1.0
    endloop
  endfacet
endsolid
```

下載MeshLab ,導入您的 stl 文件,當您取消選中二進制編碼時將其導出為 stl 文件

或者

下載FreeCAD ,導入 stl 文件,將其導出為 ast 文件

使用文本編輯器打開導出的文件,並將其復制到您的 README.md 文件中,其中:

```stl
```

了解更多信息:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM