yanzexuan
yanzexuan
Shx font file will be parsed to line segments then display. Is this what you want to know?
The viewer sets font files like this: ``` const fontFiles = ["libs/fonts/simplex.shx", "libs/fonts/hztxt.shx"]; await viewer.setFont(fontFiles); ``` You can find some code from https://www.npmjs.com/package/@pattern-x/gemini-viewer-threejs?activeTab=code  ``` export declare class ShxFont extends...
Sure, as you can see from this picture: https://github.com/pattern-x/gemini-viewer-examples/blob/main/public/demo/images/physical_structure.png Like this: ``` > dwg2dxf.exe c:\a.dwg -o c:\a.dxf ```
Just like what we did in https://github.com/pattern-x/gemini-viewer-examples/blob/main/public/demo/dxf_0.html, copy gemini-viewer.esm.min.js to some where, then: ``` import { DxfViewer } from "./gemini-viewer.esm.min.js"; ```
There is no API yet for now to handle this, we cannot dynamically change the color. Just for your reference, there is DxfLoaderConfig.overrideColor, you can set everything to this color...
That's right, setting and layer manager are panels that need to be implemented by user. Essentially, this sdk doesn't provide any UI, it just provide APIs. User can created their...
I don't quite understand your question. After a dxf is loaded, it automatically zoom to the "home" view, which is defined in the dxf itself. Do you want it to...
Oh, please try this: ``` const bbox = viewer.getBBox(); viewer.zoomToBBox(bbox); ```
Can you check carefully, if there is any small entity somewhere in the corner? That often happen. Or, you can create a new dxf, draw some entities and test again.
The viewer supports to load more than one DXF files. While it doesn't support unloading a DXF. You can simply destroy the old DxfViewer instance, and new another one to...