3

I'm using both the following libraries to parse and view dxf drawings into a webpage I am building: https://github.com/gdsestimating/dxf-parser
https://github.com/gdsestimating/three-dxf

They are built to use the three.js library. I was able to show the dxf file on the webpage, but although I tried several times, I couldn't highlight selected (clicked) lines in the dxf.

I tried using raycaster, but I keep getting that 6 objects were intersected however much I zoom in/out, or click around the drawing.

I appreciate your help. Thanks

Michael Azer
  • 63
  • 1
  • 9

1 Answers1

0

Raycaster gives you a list of faces intersected by a ray casted from the camera and passes through your cursor. They are sorted by distance to camera. So the first item of the raycasting result is the item you are looking for.

Hasan
  • 2,444
  • 3
  • 30
  • 44