diff --git a/src/Base/Builder3D.cpp b/src/Base/Builder3D.cpp index 0bc5e7fde010..d2284c4f3488 100644 --- a/src/Base/Builder3D.cpp +++ b/src/Base/Builder3D.cpp @@ -437,6 +437,16 @@ void InventorBuilder::addShapeHints(float crease) << Base::blanks(indent) << "}" << std::endl; } +void InventorBuilder::addPolygonOffset(float factor, float units, const char* styles, bool on) +{ + result << Base::blanks(indent) << "PolygonOffset {" << std::endl + << Base::blanks(indent) << " factor " << factor << std::endl + << Base::blanks(indent) << " units " << units << std::endl + << Base::blanks(indent) << " styles " << styles << std::endl + << Base::blanks(indent) << " on " << (on ? "TRUE" : "FALSE") << std::endl + << Base::blanks(indent) << "}" << std::endl; +} + //************************************************************************** // points handling diff --git a/src/Base/Builder3D.h b/src/Base/Builder3D.h index 9a78e1305be4..b30665f34b25 100644 --- a/src/Base/Builder3D.h +++ b/src/Base/Builder3D.h @@ -228,6 +228,14 @@ class BaseExport InventorBuilder * \param crease - the crease angle in radians */ void addShapeHints(float crease=0.0f); + /*! + * \brief Sets a polygon offset node. + * \param factor - Offset multiplication factor. + * \param units - Offset translation multiplication factor. + * \param styles - Can be FILLED, LINES or POINTS. + * \param on - Whether the offset is on or off. + */ + void addPolygonOffset(float factor=1.0f, float units=1.0f, const char* styles="FILLED", bool on=true); //@} /** @name Add coordinates */