View.draw_lines invisble section plane

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?

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.

2 Likes

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.

2 Likes

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 !

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.