Tagged: annotation, draw line, empty
- This topic has 5 replies, 3 voices, and was last updated 2 years, 10 months ago by
kdv.
-
AuthorPosts
-
2022-11-05 at 9:20 am #57098
PascalCustomerI have a complex interactive use case, but I break it down to this simple example.
The given obj is Suzanne, and there are two empty objects. To each Empty, an annotation is added in puzzles.
I want do draw a line from Suzanne to both annotations, but only the last drawn line is shown.Will I have to add one exclusive additional empty as a distinct source for the obj, from where a line is drawn? Or is there another, maybe smarter solution?
Thanks for your feedback!
Best regards,
Pascal2022-11-07 at 8:01 am #57122
Yuri KovelenovStaff2022-11-07 at 8:43 am #57123
PascalCustomerOK, thank you for confirming the workflow.
2022-12-12 at 9:04 am #58983kdv
Participantyou might use multiple empty objects positioned in the same place, instead of your only main object.
or you can remove this strange code from the
operateLineObjectHTMLfunctionfor (var j = obj.children.length - 1; j >= 0; j--) { var child = obj.children[j]; if (child.isLineHTML) { obj.remove(child); child.geometry.dispose(); child.material.dispose(); } }what are the reasons to remove already added lines?
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-12-13 at 9:55 pm #59041
PascalCustomerwhat are the reasons to remove already added lines?
I need to switch on/off interactively the connections (lines) between objects and html-divs, depending on the users input and cursors position. I solved it by adding more empty objects. But thank you for giving this interesting idea how I could hook in alternatively.
2022-12-13 at 10:34 pm #59042kdv
ParticipantThe question was addressed to V3D team. Not to you )))
I solved it by adding more empty objects
It’s a workaround. Removing those strings of code will allow you to add as many lines as you want to the same object.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.


