Closed dotoritos-kim closed 2 months ago
Oh, thank you in the first place, because this project rely on dxf-viewer.
A solid hatch is a THREE.Mesh with color.
Performance is a big topic, we did much work to increase it, including merging objects/materials, instancing, bvh, simplify polygons, etc.
When I gave you an example file, can you tell me what algorithms spline, solid hatch, and hatch work and how they work? Sorry if I was so rude.
Np. Are you gonna share a example file, please go ahead. I'll try my best to tell everything you interested, I may not be able to share lots of code at this time.
For spline, we tried to generate a line that is no really accurate, otherwise, there are too many points. And we'll try to merge splines with the same color, layer, etc.
We also merge hatches if they have the same color, layer, etc.
spline, hatch extream size example
I am curious about how a file containing splines and hatches of this large size is rendered. I want to know the overall flow and algorithm used.
Ok, I opened the example filess, as we can see, there are about 715 entities, mostly are splines and hatches (and of course, some of them are in inserts). This is not a big number, but it contains complex splines and hatches.
We defined a function drawSpline(), for spline entity, we can get these:
For hatch, there is drawHatch() function. we get:
Hope it help.
How did you implement SolidHatch in DxfViewer?
I am amazed at the incredible performance.
I'm curious as to whether you did the triangulation separately or used another method.
I want to see the entire dxfviewer part. I am also a vargan/dxf-viewer contributor.