-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to make gcode in a LineTubeGeometry have different radius #6
Comments
I think when you filter the lines by just removing them, it will still draw lines between the end and start of the shown segments. Are you filtering by altering the gcode? I am also thinking about a hook into the parser, so that you can filter lines directly when they are added, based on the gCode line-numers. |
I implemented an "onAddLine" now: Could you please check if that is sufficient for you? |
Yeap, cause of the segments. As you said and i thought, adding new travel moves which travel over the skipped lines works.By the way, what's the usage of |
Or is there any ways to hide or show some gcode dynamic like using |
Currently the segment colorizer does only supoirt colorizing by the values of the metadata it gets (e.g. speed). But yesterday I had the idea that the info of the current gcode-line would be helpfull here: For now you can try #8 to just skip lines based on the gcode line. I haven't looked into utilizing the shadermaterial yet. But that sounds like the best option... I have to dig into it :-) |
But skiping lines still doesn't solve the problem. As u said, it will still draw lines between the last end gcode line and next start gcode line. |
if you skip the lines, yes. But not if you set the line radius for these lines to 0. could you try something like this with the #8: renderer.onAddLine = (newLine, lineNumber) => {
if (lineNumber > 100 && lineNumber < 30000) {
newLine.radius = 0
return [newLine]
}
return [newLine]
} Then all |
Sorry, I didn't make it clearly. I do known that. But in this way, i have to generate 7 separate LineTubeGeometry with all points to show all the line types geometry. It takes too much times. I have to dig into it to find another way, thanks. |
yes, its only a simple work around for now. It may be possible with an shadermaterial as you suggested, but I have no idea how exactly that would work. |
I just experimented a bit:
|
ok, I played around with the shaders, but I couldn't realy get something to work. Apparently it is not that trivial to just not render vertices or to use transparency... I haven't done very much with shaders, yet. So if you do have some ideas, I am open to them. Another option may be the combination of #9 and #8. What do you think? |
It sound good in some case. But re-parsing is not fit me. I will do this as a long term job. Thanks. |
Your meshObject looks good. My meshObject has a few issue. It will show extra vertices etc. |
JFYI: I splitted the custom material experiment into #14 and merged the line colorizer. |
See image as below. If we want to display the LineTubeGeometry of the
inner wall
, hide the line corresponding to the gcode oftravel
. Change the radius does not work. Thanks.The text was updated successfully, but these errors were encountered: