Method DrawToTekla
- Namespace
- GeometryHelper.TeklaConvert
- Assembly
- GeometryHelper.TeklaConvert.dll
DrawToTekla(GeoPolyline3, ControlObjectColorEnum, ControlObjectLineType)
Draws an open polyline as a control polycurve.
public static ControlPolycurve DrawToTekla(this GeoPolyline3 polyline, ControlObjectColorEnum color = ControlObjectColorEnum.RED, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
polylineGeoPolyline3The polyline, in the current work plane.
colorControlObjectColorEnumThe colour of the polycurve.
lineTypeControlObjectLineTypeThe line type of the polycurve.
Returns
- ControlPolycurve
The inserted polycurve, or null when there was nothing to draw or Tekla did not insert it.
Exceptions
- ArgumentNullException
Thrown when
polylineis null.
DrawToTekla(GeoPolygon3, ControlObjectColorEnum, ControlObjectLineType)
Draws a polygon as a closed control polycurve.
public static ControlPolycurve DrawToTekla(this GeoPolygon3 polygon, ControlObjectColorEnum color = ControlObjectColorEnum.RED, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
polygonGeoPolygon3The polygon, in the current work plane.
colorControlObjectColorEnumThe colour of the polycurve.
lineTypeControlObjectLineTypeThe line type of the polycurve.
Returns
- ControlPolycurve
The inserted polycurve, or null when there was nothing to draw or Tekla did not insert it.
Exceptions
- ArgumentNullException
Thrown when
polygonis null.
DrawToTekla(GeoArc3, ControlObjectColorEnum, ControlObjectLineType)
Draws an arc as a control polycurve.
public static ControlPolycurve DrawToTekla(this GeoArc3 arc, ControlObjectColorEnum color = ControlObjectColorEnum.RED, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
arcGeoArc3The arc, in the current work plane.
colorControlObjectColorEnumThe colour of the polycurve.
lineTypeControlObjectLineTypeThe line type of the polycurve.
Returns
- ControlPolycurve
The inserted polycurve, or null when there was nothing to draw or Tekla did not insert it.
Remarks
The arc is drawn as the straight pieces ToPolyline() gives, within the automatic share of its radius, which is finer than a model view resolves. Pass a tessellated polyline yourself when the drawing has to be coarser or finer than that.
Exceptions
- ArgumentNullException
Thrown when
arcis null.
DrawToTekla(GeoCircle3, ControlObjectColorEnum, ControlObjectLineType)
Draws a circle as a closed control polycurve.
public static ControlPolycurve DrawToTekla(this GeoCircle3 circle, ControlObjectColorEnum color = ControlObjectColorEnum.RED, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
circleGeoCircle3The circle, in the current work plane.
colorControlObjectColorEnumThe colour of the polycurve.
lineTypeControlObjectLineTypeThe line type of the polycurve.
Returns
- ControlPolycurve
The inserted polycurve, or null when there was nothing to draw or Tekla did not insert it.
Remarks
The circle is drawn as the straight pieces ToPolygon() gives, about fifty of them, which is finer than a model view resolves.
Exceptions
- ArgumentNullException
Thrown when
circleis null.
DrawToTekla(GeoFace3, ControlObjectColorEnum, ControlObjectColorEnum, ControlObjectLineType)
Draws a face as closed control polycurves: its outer boundary in one colour and every hole in another.
public static ControlPolycurve[] DrawToTekla(this GeoFace3 face, ControlObjectColorEnum boundaryColor = ControlObjectColorEnum.RED, ControlObjectColorEnum holeColor = ControlObjectColorEnum.WHITE, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
faceGeoFace3The face, in the current work plane.
boundaryColorControlObjectColorEnumThe colour of the outer boundary.
holeColorControlObjectColorEnumThe colour of the holes.
lineTypeControlObjectLineTypeThe line type of the polycurves.
Returns
- ControlPolycurve[]
The inserted polycurves, the boundary first.
Exceptions
- ArgumentNullException
Thrown when
faceis null.
DrawToTekla(GeoSolid3, ControlObjectColorEnum, ControlObjectColorEnum, ControlObjectLineType)
Draws every face of a body as closed control polycurves: outer boundaries in one colour, holes in another.
public static ControlPolycurve[] DrawToTekla(this GeoSolid3 solid, ControlObjectColorEnum boundaryColor = ControlObjectColorEnum.RED, ControlObjectColorEnum holeColor = ControlObjectColorEnum.WHITE, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
solidGeoSolid3The body, in the current work plane.
boundaryColorControlObjectColorEnumThe colour of the outer boundaries.
holeColorControlObjectColorEnumThe colour of the holes.
lineTypeControlObjectLineTypeThe line type of the polycurves.
Returns
- ControlPolycurve[]
The inserted polycurves.
Remarks
A curved surface arrives triangulated, so a round tube draws hundreds of polycurves.
Exceptions
- ArgumentNullException
Thrown when
solidis null.
DrawToTekla(IEnumerable<GeoSolid3>, ControlObjectColorEnum, ControlObjectColorEnum, ControlObjectLineType)
Draws every face of several bodies as closed control polycurves: outer boundaries in one colour, holes in another.
public static ControlPolycurve[] DrawToTekla(this IEnumerable<GeoSolid3> solids, ControlObjectColorEnum boundaryColor = ControlObjectColorEnum.RED, ControlObjectColorEnum holeColor = ControlObjectColorEnum.WHITE, ControlObjectLineType lineType = ControlObjectLineType.SolidLine)
Parameters
solidsIEnumerable<GeoSolid3>The bodies, in the current work plane. Null entries are skipped.
boundaryColorControlObjectColorEnumThe colour of the outer boundaries.
holeColorControlObjectColorEnumThe colour of the holes.
lineTypeControlObjectLineTypeThe line type of the polycurves.
Returns
- ControlPolycurve[]
The inserted polycurves.
Exceptions
- ArgumentNullException
Thrown when
solidsis null.