0

I am writing an extension on Autodesk APS Viewer (forge), which adds an svg element on top of the model.

I succeeded on creating the svg, getting the bounds and viewbox from the viewer to feed my svg and append my geometry on it.

Unfortunately, when displayed the pan and zoom function of the viewer no longer works. If I hide my svg element I can pan and zoom again.

I cannot use the autodesk markup extension as I need to custom user interactions with the geometry.

Thanks for your help.

Louis-Marie Borione

2 Answers 2

1

I believe this is because the SVG layer is "capturing" pointer events such as mousedown or mousemove, preventing them from reaching the viewer. You'll need to set the CSS property pointer-events to none for the <svg> element, and potentially for some if the content there as well.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, the svg element was capturing every mouse events.
0

You can try the approach described at https://aps.autodesk.com/blog/merge-pdfs-svg-lines

That leverages BufferGeometry (refer to https://threejs.org/docs/#api/en/core/BufferGeometry) to draw geometries on top of the scene. Later, you can mimic those geometries as SVG and even print those in case of PDF files.

For text, you can leverage TextGeometry, as done in https://aps.autodesk.com/blog/how-do-you-add-labels-forge-viewer

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.