Thank you all Guys!!
@rtches it could be a chance to test! Actually I’m developing an extension that I want to run also on SK2020 and overlay method is not available!
@DanRathbun thank you for your clarification, it helps a lot as always!
@john_mcclenahan I will have a look to your extension, thank you indeed!
@curic4su you got it! I want to do what you have done in the video!! Just a few things: I don’t need to generate the 3D Text on mouse move while genereting the polyline, I want to generate the polyline and the 3D Text in the same time, just as in the video below:
Do you have some snipped code to refer at, just to replicate it? Actually I’m aligning the 3D Text group to the edges in a way that the X axis of the 3D Text is parallel to the edge and the Y axis is perpendicular to it (Z is created as a cross product), following the suggestion of @slbaumgartner to use a matrix transformation (you can refer to Align Group based on vectors topic I recently open):
for i in 0...@vettore.length
@grouptext = disgn.entities.add_group
@grouptext.name = txt_display[i].to_s + " 3D Text"
@grouptext.entities.add_3d_text(txt_display[i].to_s, TextAlignCenter, "Arial", false, false, 2.0, 0.0, 0.0, true, 0.0)
@textx = txpoint[i].x
@texty = txpoint[i].y
@textz = txpoint[i].z
@new_x = @vettore[i]
@new_y = @v_off[i]
@new_z = @vettore[i]*@v_off[i]
@new_x.normalize!
@new_y.normalize!
@new_z.normalize!
self.posiziona_3dText
Where posiziona_3dText recall the transformation matrix:
def posiziona_3dText
trans_array = []
trans_array[0] = @new_x[0]
trans_array[1] = @new_x[1]
trans_array[2] = @new_x[2]
trans_array[3] = 0.0
trans_array[4] = @new_y[0]
trans_array[5] = @new_y[1]
trans_array[6] = @new_y[2]
trans_array[7] = 0.0
trans_array[8] = @new_z[0]
trans_array[9] = @new_z[1]
trans_array[10] = @new_z[2]
trans_array[11] = 0.0
trans_array[12] = @textx
trans_array[13] = @texty
trans_array[14] = @textz
trans_array[15] = 1.0
@grouptext.transform!(Geom::Transformation.new(trans_array))
end
Again, thank you all!