Polygon2D¶
The value type Polygon2D is used to create the input controls for a 2D polygon
Syntax¶
<Parameter>
<Name>Polygon2DRow</Name>
<Text>_</Text>
<ValueType>Row</ValueType>
<Parameter>
<Name>Polygon2</Name>
<Text>Point</Text>
<Value>Polygon2D(Points((5000,2000)(6000,3100)(5000,3500)(5000,2000)))</Value>
<ValueType>Polygon2D</ValueType>
</Parameter>
</Parameter>
If each coordinate is to be displayed in a separate line, the syntax looks like this
<Parameter>
<Name>Polygon2</Name>
<Text>Point</Text>
<Value>Polygon2D(Points((5000,2000)(6000,3100)(5000,3500)(5000,2000)))</Value>
<ValueType>Polygon2D</ValueType>
</Parameter>
The result is
Value unit¶
The unit for the default values assigned to the coordinate values in <Value> is mm.
Example¶
The implementation of the Polygon2D value type is described in the example GeometryElementsInput located in
…\etc\Examples\PythonParts\PaletteExamples\GeometryElementsInput.pyp…\etc\PythonPartsExampleScripts\PaletteExamples\GeometryElementsInput.py