Hi
I would like to know is there any API which support 2D coordinates projection into to arbitrary 3D plane.
Benjamin Bihler Tue, 08/18/2015 - 15:03
Hi,
I guess there is nothing. 2D coordinates are given with respect to a surface. You should compute a 3D point from them and this point you can project onto the plane using linear algebra.
Tue, 08/18/2015 - 15:03
Hi,
I guess there is nothing. 2D coordinates are given with respect to a surface. You should compute a 3D point from them and this point you can project onto the plane using linear algebra.
Benjamin
Tue, 08/18/2015 - 19:13
Hi M.G
yes there is. use GeomAPI::To3d(2dcurve, 3dplane). here is an example:
//say you had a 2d curve
Handle(Geom2d_Circle) circ2d = new Geom2d_Circle(circ.Axis(),circ.Radius());
// and a 3d plane
Handle(Geom_Plane) plane3d = new Geom_Plane(avrgplane);
// you can transfer the 2d curve to an arbitrary 3d plane using GeomAPI::To3d function
Handle(Geom_Curve) C3D = GeomAPI::To3d(circ2d,avrgplane);
Tue, 08/18/2015 - 20:45
if you simply want to evaluate 2d coordinates into an arbitrary plane rather than using 2d curves simply use the D0 of the plane:
build the 3d plane:
Handle(Geom_Plane) plane3d = new Geom_Plane...;
Double X = 20;
Double Y = 30;
gp_Pnt thepoint = plane3d->D0(X,Y);