From 493d1b046a53193bffa0044d42b326cb023624c6 Mon Sep 17 00:00:00 2001 From: Leon Ziegler Date: Tue, 7 Apr 2015 10:30:08 +0200 Subject: [PATCH] Add new type PolygonalPatch3D to sandbox --- proto/sandbox/rst/geometry/PolygonalPatch3D.proto | 49 +++++++++++++++++++++++ 1 file changed, 49 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..d739c69 --- /dev/null +++ b/proto/sandbox/rst/geometry/PolygonalPatch3D.proto @@ -0,0 +1,49 @@ +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. The polygon should not be self + * intersecting. + * + * @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. + * + * Winding rule: ccw w.r.t. normal (Z axis) (right-hand rule) + * + * Linear segments arise by connecting consecutive entries of the + * array (including an additional implicit segment connecting the + * last entry to the first entry). + * + * Order of entries is significant. + */ + // @constraint(len(value) >= 3) + repeated math.Vec2DFloat border = 2; + +} -- 1.9.1