Draw planes on 3D mesh using mouse drag


Is it possible to draw planes (rectangles) directly on a 3D glb model of a building in real time?
I want to click on 3D model and drag it to another point of the model in order to draw the rectangle (Plane).

Any suggestions or code examples?

Maybe this SO question will give you some ideas:

1 Like

@prisoner849 ell I don’t want my plane to be exactly attached to the 3D mesh
It can float in the air.

I actually want to draw rectangle(plane) using mouse drag just like we do in the Paint application of windows.

The only difference is now it is a 3D space.

There you are, for more ideas:

First of all I really appreciate you helping me with the issues that I had in drawing planes on 3D model.

But I am facing yet another issue which has to do with drawing rectangles on certain objects in my 3D model. I would like to be able to draw rectangle perfectly aligned with objects.
Please see the following
This is our 3D model in glb format.

I am trying to draw rectangles over certain objects that are not necessarily aligned with the axes of 3D space.

My problem is that the rectangle is never aligned with our objects hence I have to rotate and resize every time which is a difficult thing to do.

I would like to be able to rotate the model and place it in a certain way and draw the rectangles perfectly aligned with the object without having to resize and rotate.

@Ujwaldeep_Singh did you ever figure out how to draw with rotation?