From 58625b7ee4a93200d3d608df1880d00bcb34ba1e Mon Sep 17 00:00:00 2001 From: Leon Ziegler Date: Tue, 31 Mar 2015 15:20:47 +0200 Subject: [PATCH] Added new type PolygonalPatch3D to sandbox. fixes #2211 Signed-off-by: Jan Moringen --- proto/sandbox/rst/geometry/PolygonalPatch3D.proto | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 proto/sandbox/rst/geometry/PolygonalPatch3D.proto diff --git a/proto/sandbox/rst/geometry/PolygonalPatch3D.proto b/proto/sandbox/rst/geometry/PolygonalPatch3D.proto new file mode 100644 index 0000000..21f8a30 --- /dev/null +++ b/proto/sandbox/rst/geometry/PolygonalPatch3D.proto @@ -0,0 +1,51 @@ +package rst.geometry; + +option java_outer_classname = "PolygonalPatch3DType"; + +import "rst/geometry/Pose.proto"; +import "rst/math/Vec2DFloat.proto"; + +/** + * A two-dimensional patch in 3D space bounded by a polygon. + * + * In contrast to planes (with infinite extend) this kind of bounded + * patch needs a local coordinate system in order to define the + * borders of the patch. Thus, instead of the widely used point-normal + * representation, we use a complete 6D pose or describing the + * location of the plane. We define that the X and Y axes of the + * resulting coordinate system span the plane. Accordingly, the Z axis + * corresponds to the normal on the plane. The patch border is a 2D + * polygon defined by a sequence of @ref .math.Vec2DFloat objects. + * + * In order to construct a 3D representation of the patch, the 2D + * coordinates of the polygon must be extended by a Z = 0 coordinate + * and transformed using the 6D pose. + * + * TODO self intersection, convex? + * + * @author Leon Ziegler + */ +message PolygonalPatch3D { + + /** + * The 6D transformation specifying the base (X and Y axes span + * the plane in which the patch and its bounding polygon reside). + */ + required Pose base = 1; + + /** + * The 2D polygon defining the border of the patch. + * + * TODO winding rule: ccw or cw w.r.t. normal (== Z axis)? + * + * Linear segments arise by connecting consecutive entries of the + * array (including an additional implicit segment connecting the + * last entry to the first entry). + * + * TODO Duplicate entries are not allowed? + * Order of entries is significant. + */ + // @constraint(len(value) >= 3) + repeated math.Vec2DFloat border = 2; + +} -- 1.9.1