View.draw_lines invisble section plane

draw_lines

#1

Hi,

I made a tool in ruby. on mac mac book pro OSX with sketchup pro 2018, the line of my tool are cut with an invisible section plane like the cliping box of the graphic card.

			lines.each{|line|
			#	puts "__#{line.inspect}__"
				view.draw_lines(line[0],line[1])
			}

Is theire any solution?


#2

You need to adjust the models bounding box to include your drawn lines. On my phone now so I can’t look it up, but there is a Tool method to do this.


#3

It’s the getExtents method of the Tool interface that is used to determine the bounding box to render in.

By default the model bounding box is used, but as your new lines extend outside the bounding box they risk being clipped. If you let the getExtents method return a bounding box defined by the start and end of the frame, as well as its height, it should be fully drawn.


#4

Wahooo Eneroth, you’re too strong ! Thanks a lot for your answer , I doesn’t know this method before your show me! That exactly what I m looking for !