Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Dimensioning Components

  • Last UpdatedJan 07, 2026
  • 5 minute read

It is possible to create four different kinds of 2D dimensionings: Linear, Angle, Diameter and Radius. See MDS Drafting, Model Viewing and General Drafting for layout details. See also Hull Drafting, Appendices for default keywords ruling the layout.

dim_linear_new(Measpnts, Type, Dir, Pos)

The function creates a linear 2D dimensioning component, given a number of points. The dimension lines will be parallel to Dir and pass through the point Pos.

Input Parameters:

Measpnts

Polygon2D

Polygon containing the measure points

Type

integer

Type of measure:

1 = Normal

2 = Chain

3 = Staircase

Dir

Vector2D

The direction of the measure

Pos

Point2D

The location of the measure

Returned value:

[0]

integer

Handle to the created component

Exceptions:

kcs_DrawingNotCurrent

No drawing was current

kcs_ValueError

Invalid parameter value

kcs_OwnerNotFound

No structural owner to the dimensioning component could be derived

kcs_MeasureNotCreated

Failure creating the dimensioning component

dim_angle_new(Line1, Line2, ArcPos, TextPos)

The function creates an 2D angular dimensioning component, given two non-parallel lines.

Input Parameters:

Line1

Rline2D

The first line

Line2

Rline2D

The second line

ArcPos

Point2D

The location of the measure arc

TextPos

Point2D

The location of the measure text

Returned value:

[0]

integer

Handle to the created component

Exceptions:

kcs_DrawingNotCurrent

No drawing was current

kcs_ValueError

Invalid parameter value

kcs_LinesParallel

The two lines are parallel

kcs_OwnerNotFound

No structural owner to the dimensioning component could be derived

kcs_MeasureNotCreated

Failure creating the dimensioning component

dim_diameter_new(CircleOrArc, Pos1, Pos2)

The function creates a 2D diameter dimensioning component, given a circle or an arc.

Note: Pos1 and Pos2 are optional.

• If neither Pos1 nor Pos2 are not given, the reference line will start at:

• if arc object: the middle of the arc

• if circle object: the middle of the upper right quadrant of the circle

The reference line will aim towards the center of the arc or the circle

• If Pos1, but not Pos2, is given, the reference line is defined by Pos1 and the center of the arc or the circle. If Pos1 is a point inside the circle or the imagined circle defined by the arc, the reference line will aim away from the center; otherwise it will aim towards the center.

• If both Pos1 and Pos2 are given a "knuckled" measure is created. The reference line will pass through Pos1 and the horizontal line will pass through Pos2.

Input Parameters:

CircleOrArc

Circle2D/Arc2D

Object containing the arc/circle to be measured

Pos1

Point2D

The location of the measure (optional)

Pos2

Point2D

The location of the horizontal part in a "knuckled" measure (optional)

Returned value:

[0]

integer

Handle to the created component

Exceptions:

kcs_DrawingNotCurrent

No drawing was current

kcs_ValueError

Invalid parameter value

kcs_OwnerNotFound

No structural owner to the dimensioning component could be derived

kcs_MeasureNotCreated

Failure creating the dimensioning component

dim_radius_new(CircleOrArc, Pos1, Pos2)

The function creates a 2D radius dimensioning component, given a circle or an arc.

Note: Pos1 and Pos2 are optional.

  • If neither Pos1 nor Pos2 are not given, the reference line will start at:

    • if arc object: the middle of the arc

    • if circle object: the middle of the upper right quadrant of the circle

    • The reference line will aim towards the center of the arc or the circle.

  • If Pos1, but not Pos2, is given, the reference line is defined by Pos1 and the center of the arc or the circle. If Pos1 is a point inside the circle or the imagined circle defined by the arc, the reference line will aim away from the center; otherwise it will aim towards the center.

• If both Pos1 and Pos2 are given a "knuckled" measure is created. The reference line will pass through Pos1 and the horizontal line will pass through Pos2

Input Parameters:

CircleOrArc

Circle2D/Arc2D

Object containing the arc/circle to be measured

Pos1

Point2D

The location of the measure (optional)

Pos2

Point2D

The location of the horizontal part in a "knuckled" measure (optional)

Returned value:

[0]

integer

Handle to the created component

Exceptions:

kcs_DrawingNotCurrent

No drawing was current

kcs_ValueError

Invalid parameter value

kcs_OwnerNotFound

No structural owner to the dimensioning component could be derived

kcs_MeasureNotCreated

Failure creating the dimensioning component

dim_linear_new(polygon3D, type, projDir, locPoint2D, witnDir, <modelsubview>, <basepoint>)

The function creates a new 3D linear dimension.

Input Parameters:

polygon3D

Polygon3D

3D polygon which contains 3D points for dimensioning.

type

integer

Type of dimension:

1 Normal

2 Chain

3 Staircase

projDir

Vector3D

Projection direction vector.

locPoint2D

Point2d

2D point in drawing where the coordinate dimension should be placed.

witnDir

Vector3D

Direction vector for witness lines.

modelsubview

ElementHandle

Handle to a subview where dimension will be placed. It must be a model subview (optional).

basepoint

integer

Index of measure point (0 based) which will be used to define dimension element plane. This parameter is optional. If no index is given the first point will be used.

Returned value:

[0]

integer

Handle to created dimension component.

Exceptions:

kcs_ArgumentError

Invalid parameter type.

kcs_ValueError

Invalid parameter value.

kcs_DrawingNotCurrent

No drawing was current.

kcs_SubviewNotFound

Subview not found.

kcs_MeasureNotCreated

Dimension element not created.

kcs_Error

General error.

dim_point_3d(point3D, locPoint, height, rotation, annotation, <modelsubview>)

The function creates a new point 3D dimension.

Input Parameters:

point3D

Point3D

3D point for which the coordinates should be displayed.

locPoint

Point2d

2D point in drawing where the coordinate dimension should be placed.

height

real

Height of dimension text.

rotation

real

Rotation of dimension box.

annotation

string

Annotation text. If empty no annotation will be added.

modelsubview

integer

Handle to a subview where dimension will be placed. It must be a model subview (optional).

Returned value:

[0]

integer

Handle to created dimension component.

Exceptions:

kcs_ArgumentError

Invalid parameter type.

kcs_ValueError

Invalid parameter value.

kcs_DrawingNotCurrent

No drawing was current.

kcs_SubviewNotFound

Subview not found.

kcs_MeasureNotCreated

Dimension element not created.

kcs_Error

General error.

kcs_HandleInvalid

Invalid handle to given subview.

dim_shell_new(Viewhandle,From, Along, To, <Type>, <Colour>)

The function adds dimensioning from one model object to another along a third in a given view. The model objects have to intersect the same surface. Valid model types are: longitudinal, transversal, hull curve, seam and stiffener.

Input Parameters:

Viewhandle

Element Handle

Handle to model view.

From

List

List of KcsModel.Model

Along

List

List of KcsModel.Model

To

List

List of KcsModel.Model

Type

Integer

= 0: only the dimension text will be created.

= 1: Arrow at end point and circle at start point also displayed.

= 2: The dimension trace are also displayed.

Colour

KcsColour.Colour

The colour of the dimension

Returned value:

[0]

List

Handles to the created components

Exceptions:

kcs_DrawingNotCurrent

No drawing was current

kcs_ValueError

Invalid parameter value

kcs_ArgumentError

Invalid arguments list

kcs_GeneralError

List of result can't be created for some internal reason

kcs_ ModelViewNotFound

Specified view not found

Example:

# Example: kcs_ex_draft8.py

# Example: kcs_ex_draft29.py

# Example: kcs_ex_draft28.py

TitleResults for “How to create a CRG?”Also Available in