Geometry
The parameter with the geometry value types can be used to create input controls
for the geometry elements like point, line or spline. Although the input controls
are the same, as e.g., for <Valuetype>
Length, the value of the parameter represents
an actual geometry object from the module NemAll_Python_Geometry.
Value types
Point
Vector
Arc
Defining <ValueType>
as Arc2D creates a parameter that returns an Arc2D
object as a result value.
Defining <ValueType>
as Arc3D creates a parameter that returns an Arc3D
object as a result value.
<Parameter>
<Name>Arc3</Name>
<Text>Arc</Text>
<Value>Arc3D(CenterPoint(7000, 5000, 1000) XDirection(1, 0, 0) ZAxis(0, 0, 1) MinorRadius(1000) MajorRadius(2000) AxisAngle(0.78539816339744828) StartAngle(0.78539816339744828) EndAngle(4.7123889803846897) IsCounterClockwise(1))</Value>
<ValueType>Arc3D</ValueType>
</Parameter>
Circle
Line
Polyline
Defining <ValueType>
as Polyline2D creates a parameter that returns a Polyline2D
object as a result value
Defining <ValueType>
as Polyline3D creates a parameter that returns a Polyline3D
object as a result value
Polygon
Spline
BSpline3D
Defining <ValueType>
as BSpline3D creates a parameter that returns a BSpline3D
object as a result value
<Parameter>
<Name>BSpline3</Name>
<Text>Point</Text>
<Value>BSpline3D(IsPeriodic(0)Degree(3)Weights()Knots(0,0,0,0,1,1,1,1)Points((12000,7000,0)(13000,9100,1000)(15000,6000,3000)(18000,9000,0)))</Value>
<ValueType>BSpline3D</ValueType>
</Parameter>
Coordinates in one row
If a geometry object requires a point or a vector (2D or 3D) to be specified, the coordinates for it can be displayed in the palette in two ways:
This is the default way, how point coordinates will be displayed in the palette.
Individual text for each coorinate
When for each of the x,y and z coordinates an individual text in the palette has to be set,
this can be achieved by defining all the texts in the <Text>
tag, seperated with a coma.
<Parameter>
<Name>RefPoint</Name>
<Text>From left,From front,From bottom</Text>
<Value>Point3D(1000,2000,3000)</Value>
<ValueType>Point3D</ValueType>
</Parameter>
Hide or disable a control
When a geometry parameter has to be disabled or hidden, this can be achieved with the
tags <Visible>
and <Enable>
as described in
this chapter.
However, if only a single component of the geometry parameter needs to be hidden or disabled
(e.g., a ), it can be achieved by introducing |
character in the tag.
<Parameter>
<Name>StartPoint</Name>
<Text>Start point</Text>
<Value>Point3D(5000,1000,0)</Value>
<ValueType>Point3D</ValueType>
<Visible>|StartPoint.Y:False<!--(1)!--></Visible>
</Parameter>
- This will hide the Y component of the point in the palette.
Example
The implementation of all geometrical value types is shown in the examples located in:
…\etc\Examples\PythonParts\PaletteExamples\GeometryElements\