dxf-viewer
dxf-viewer copied to clipboard
Drawing function
Hi everyone! i have a question: It is possible add function for drawing line, polyline or other elements? Thanks!
Hi! You can use DxfViewer.GetScene() method to obtain three.js scene object which can be used to add any additional objects to render. To match model space coordinates you should subtract scene origin from your objects coordinates. The origin can be obtained by DxfViewer.GetOrigin() method.
Hi Vagran,
thanks for your response, where is tutorial for instalation without node, i want install only javascript+html version.
When i install via node cmd with command : npm install dxf-viewer I get the result:
I dont see example version in HTML + Javascript :-(
There is currently no any bundle build. You can find usage example in typical full-featured web application here.
Will this compilation be available?
Currently it is not planned for this version. Bundle building is planned for next major release which will be rewritten in TypeScript.
I understand, can you help me run your solution from the simplest version without node to open a dxf file? Only html and js?
I doubt I can help there, since I am not really familiar with modern web application build toolchain, so I also need to spend some time for some research. You may invest your time in learning some of web building tools (like rollup, webpack, esbuild etc.) and producing a bundle. Then check the code in the example mentioned above to get basic understanding how the library is used.
Ok, where i find documentation?
The library API is documented by JsDoc comments in the source code.
Thanks, but still i dont know how i can run this library, i need simple example only index.html where i add patch to the dxf file, and finally in browser index.html show dxf file...