We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
How to convert point2D to point3D using Hemesh library?
The reason why I working with point2D at first steps is that my script is based on 2D polygon functionality (like intersection and subtraction). Then I copy intersected polygon's point to point2D arrayList.
But after that I want to work with the point in 3D. For example just changing the z coordinate. But for the first I somehow need to copy point from point2D to point3D.
Could you help with this please?
Here is quote from the code:
'
List <WB_Polygon2D> intersectPolys = new ArrayList <WB_Polygon2D>();
List<WB_Point2d> pointsInput1 = new ArrayList <WB_Point2d>();
List<WB_Point2d> pointsInput2 = new ArrayList <WB_Point2d>();
List<WB_Point2d> pointsInput3 = new ArrayList <WB_Point2d>();
List<WB_Point3d> intPt = new ArrayList <WB_Point3d>();
for (int i = 0; i < pointsInput1.size(); i++) {
pointsInput3.addAll(substractManyFromOne(pointsInput1.get(i),
pointsInput2));
intPt.add((WB_Point3d) pointsInput3); // Here I get the error, when I use pointsInput3 I have a script with errors and when intPt I have error (pointsInput3 - Point2d class of Hemesh, intPt - Point3d class of Hemesh)
}// for
'
I know that simply the difference is z value between 2D and 3D, but how have add z value to point2D to get pass it to point3D?
Thank you, Petras.