It will take some time to master it to keep low poly; but its working pretty nice
Displacer: It places object instances along a path, changing scale and rotation also.
Comming very very soon, like 15min.
Would appreciate any advices on how to avoid it: (inverted normals)
It happens every now and then on my extension, not sure I’m doing something wrong…
the algorithm is the same, idk why would it happen
And after several hours of pure suffering and intense brain pain…
I managed to get 3d inputpoints!
Thanks to Dan, Dezmo and Thom for all posts on this subject.
Saddly the docs seems very confusing on this topic, maybe its just me
But here we go, 2 simple ways of getting it:
(Just click on viewport and it prints the 3d position)
#Method 1 (I like how its just simple)
class My_Tool
def onLButtonDown(flags, x, y, view)
puts (view.inputpoint x,y).position
end
end
@Tool = My_Tool.new
Sketchup.active_model.select_tool(@Tool)
#--------------------------------------------
#Method 2 (maybe its easier to draw things on this way)
class My_Tool
def activate
@mouse_ip = Sketchup::InputPoint.new
end
def onLButtonDown(flags, x, y, view)
@mouse_ip.pick(view, x, y)
puts @mouse_ip.position
end
end
@Tool = My_Tool.new
Sketchup.active_model.select_tool(@Tool)
Advices on drawing points and GL things from there are very welcome.
You are welcome.
I was confused too at the beginning, but after examined tons of codes from others and bunch of trial and fails, read the forum… started to make sense, and the picture is starting to come together (sort of). I’m still not a programmer, but I feel more comfortable to understand the docs and codes.
I find now the doc is more or less okay.
(BTW if you didn’t know there is a link in doc to “official” GitHub sketchup-ruby-api-tutorials, with commented examples:
File: SketchUp Ruby API — SketchUp Ruby API Documentation )
Your examples are “oversimplified” , so I’m not sure what you really want to achieve, or just showing?
It is not “drawing things” just print outs to Console…
You may take a look on my old “thinking out loud” topic…
Never mind, you are more than welcome to create a topic in Developers - Ruby API category and ask specific questions. (This category is monitored by me more than other categories - I guess by Dan and Thom too.)
Hard to tell, without seeing the code…
Create a topic in Developers - Ruby API category with example code, then someone may catch the issue…
Yeah… that was just a start point, getting the basic (even so hard to learn )
Thats just great! gonna be useful for sure, thx for that.
And you still say ur not a programmer
Sounds wiser, gonna do that.
Sure, gonna write a short example trying to reproduce the problem.
Thanks