1 Star 2 Fork 0

一零 / three-dxf-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Three-Dxf

Three-Dxf is a javascript viewer for dxf files. It takes dxf objects produced from Dxf-Parser and renders them using three.js.

Install

npm install three-dxf

For now we recommend cloning the repo, and starting with our sample. See Run Samples below.

Example of the viewer

Usage

// See index.js in the sample for more details
var parser = new window.DxfParser();
var dxf = parser.parseSync(fileReader.result);
cadCanvas = new ThreeDxf.Viewer(dxf, document.getElementById('cad-view'), 400, 400);

Run Samples

# first, compile three-dxf
> npm install
> npm run build

# then install the sample's dependencies
> cd sample
> npm install

# go back to the root and run http-server to run the sample
> cd ..
> npm install -g http-server@0.9.0
> http-server .
# use `http-server -c-1 .` to prevent caching

After performing the steps above, you can see the example at http://127.0.0.1:8080/sample/index.html. You can use the dxf file included in the sample. NOTE: the latest version of http-server will go into a redirect loop if you exlcude "/index.html" from the url.

Supported DXF Features

Supports:

  • Most LW entities (lines, polylines, circles, etc)
  • Layers
  • Simple Text
  • Splines
  • Ellipses
  • Text and MText (Basic multiline support available in v1.3.0 but not all formatting is supported)

Does not yet support:

  • Attributes
  • 3DSolids
  • All types of Leaders
  • other less common objects and entities.
The MIT License (MIT) Copyright (c) 2015 GDS Storefront Estimating Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

three-dxf 支持编辑功能 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/zcl10/three-dxf-editor.git
git@gitee.com:zcl10/three-dxf-editor.git
zcl10
three-dxf-editor
three-dxf-editor
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891