Uploaded by Ali Karagişi

VITESSE

advertisement
Python Classes
Page 1 of 69
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Python Classes
General
This section describes the General Python classes used in the different Vitesse interfaces. Class methods
may be changed or added by the programmer. However, the class attributes may NOT be changed. To
use the classes, add 'import Kcs<classname>' in the Vitesse program. The class attributes can be
updated by using dot-notation (although methods exist for this purpose).
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Geometry
These python classes handles different kinds of geometry.
Class KcsPoint2D.Point2D
The class holds information about a 2D point. It is the basic class for Vitesse 2D
operations.
Parameters and attributes:
X
real
x-coordinate of the point
Y
real
y-coordinate of the point
Constructor:
Point2D (<x>, <y>)
This constructor will create instance of Point2D class.
Parameters are defined as above, default values are zeros.
Methods:
DistanceToPoint(p)
p
real
Calculates straight line distance between
point and second point given as
parameter.
Point2D
Point to get distance to
Move (xmove,
ymove)
Translates the point by given values
xmove
real
Change in x-coordinate
ymove
real
Change in y-coordinate
Round (decimals)
Rounds coordinate values to a given
number of decimals.
Example:
p = Point2D(103.67,203.73)
p.Round(1)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 2 of 69
print p # [X Y:103.7,203.7]
decimals
integer
Number of decimals to round to
SetFromPoint (p)
Set point as a copy of other point
p
Point2D
Point to copy coordinates from
SetFromMidpoint
(p1, p2)
Update the point to be the midpoint of two
other points
p1
Point2D
First point
p2
Point2D
Second point
SetCoordinates(x,y)
Update point coordinates. Parameters are
defined as attributes above.
Class protocols:
__repr__
Used to return string representation of Point2D object
__cmp__
Used to compare two Point2D objects
Example:
point = KcsPoint2D.Point2D(10.0,0.0)
Class KcsVector2D.Vector2D(X,Y)
The class holds information about a 2D vector.
Parameters and attributes:
X
real
x-coordinate of the vector
Y
real
y-coordinate of the vector
Methods:
SetFromVector
SetLength
SetFromPoints
BlankProduct
CompareVector
SetFromVectorDifference
DotProduct
SetComponents
Length
LargestComponentAxis
Rotate
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 3 of 69
Round
ScalarComponentOnVector
SetFromVectorSum
SetToUnitVector
Example:
vec = KcsVector2D.Vector2D(1.0,0.0)
Class KcsRline2D.Rline2D(Start,End)
The class holds information about a restricted 2D line.
Parameters and attributes:
Start
Point2D
Start point of the line
End
Point2D
End point of the line
Methods:
None
Examples:
sp
= KcsPoint2D.Point2D(0.0,0.0)
ep
= KcsPoint2D.Point2D(100.0,100.0)
line = KcsRline2D.Rline2D(sp,ep)
Class KcsRectangle2D.Rectangle2D(Corner1,Corner2)
The class holds information about a 2D axis-parallel rectangle.
NB: The rectangle is defined by two opposite corners.
Parameters and attributes:
Corner1
Point2D
First corner of the rectangle
Corner2
Point2D
Second corner of the rectangle
Methods:
None
Examples:
c1 = KcsPoint2D.Point2D(0.0,0.0)
c2 = KcsPoint2D.Point2D(100.0,100.0)
rectangle = KcsRectangle2D.Rectangle2D(c1,c2)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 4 of 69
Class KcsArc2D.Arc2D
The class holds information about a 2D arc segment. It is used in many Vitesse classes
and functions i.e. arc_new, arc_highlight and dim_diameter_new in module kcs_draft.
Parameters and attributes:
Start
Point2D
Start point of the arc segment
End
Point2D
End point of the arc segment
Amplitude
real
Amplitude of the arc segment
Constructor:
Arc2D (start, end,
amplitude)
This constructor will create instance of Arc2D class.
Parameters are defined as above.
Methods:
None
Class protocols:
__repr__
Used to return string representation of Arc2D object.
Examples:
sp = KcsPoint2D.Point2D(0.0,0.0)
ep = KcsPoint2D.Point2D(100.0,100.0)
ampl = 30.0
arc = KcsArc2D.Arc2D(sp,ep,ampl)
arc.Amplitude = 40
Class KcsCircle2D.Circle2D
The class holds information about a 2D circle. It is used in Vitesse kcs_draft module
functions i.e. dim_diameter_new, circle_new or circle_highlight.
Parameters and attributes:
Centre
Point2D
Centre of the circle
Radius
real
Radius of the circle
Constructor:
Circle2D (centre,
radius)
This constructor will create instance of Circle2D class.
Parameters are defined as above.
Methods:
HasPoint (point)
integer
Checks whether given point is inside the circle:
1 – point is inside the circle
0 – point is outside the circle or it is on
the circle
point
IsPointOnCircle
Point2D
Point to test.
integer
Checks whether given point is on the circle:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 5 of 69
1 – point is on the circle
0 – point is inside or outside the circle
(point)
point
GetTangentPoints
(tngPnt1, <tngPnt2>,
<cle>)
Point2D
Point to test
Point2D
or
[ Point2D,
Point2D ]
No optional parameters given:
Method gets possible tangent points. Each of two
returned tangent points on the circle and a point
tngPnt1 outside the circle defines tangent to the
circle. If tngPnt1 is on the circle, method returns
only one point equal to tngPoint1.
Optional parameters given:
Method returns one tangent point of the master
circle and one tangent point of circle <cle>,
both lying on one common tangent of two circles.
Points tngPnt1 and tngPnt2 define which variant
of tangential line is considered (resulting points
are possibly closest to given).
tngPnt1
Point2D
A point outside the circle essential for main circle
tangent point(s) calculation
<tngPnt2>
Point2D
An approximate tangent point to circle <cle> for
common tangent calculation.
<cle>
Circle2D
Second circle for common tangent calculation
Vector2D
Method returns a vector which is a tangent to
circle through point pntExt and the tangent point
closest to approximate point pntRef selected by
the user.
pntExt
Point2D
A point outside the circle
pntRef
Point2D
A point on the circle defining tangent vector
variant
TangentAtPoint
(pntExt, pntRef)
Class protocols:
__repr__
Used to return string representation of Circle2D object.
Examples:
cp = KcsPoint2D.Point2D(100.0,100.0)
rad = 50.0
circle = KcsCircle2D.Circle2D(cp,rad)
Class KcsEllipse2D.Ellipse2D(Corner1,Corner2)
The class holds information about a 2D ellipse circumscribed by a rectangle.
NB: The circumscribing rectangle is defined by two opposite corners.
Parameters and attributes:
Corner1
Point2D
First corner of the circumscribing rectangle
Corner2
Point2D
Second corner of the circumscribing rectangle
Methods:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 6 of 69
Examples:
c1 = KcsPoint2D.Point2D(100.0,100.0)
c2 = KcsPoint2D.Point2D(400.0,400.0)
ellipse = KcsEllipse2D.Ellipse2D(c1,c2)
Class KcsPolygon2D.Polygon2D
The class holds information about a 2D polygon. Polygon is represented as a list of
points. Polygons are used in Vitesse functions i.e. note_new() in module kcs_draft.
Parameters and attributes:
Polygon
[ Point2D ]
List of polygon points. Access to list is
possible also by class protocols __len__,
__getitem__ and __setitem__
Constructor:
Polygon2D(<startp>)
<startp>
This constructor will create instance of
Point2D class. If startp is not None, it
initiates the list of polygon points in
Polygon attribute.
Point2D
Start point of the polygon. None by default
Methods:
AddPoint(nextp)
nextp
Adds a point at the end of the polygon
Point2D
The next point of the polygon
Class protocols:
__repr__
Used to return string representation of Polygon2D object
__cmp__
Used to compare two Polygon2D objects
__len__
Used to return the length of polygon (number of points in
Polygon attribute)
__getitem__
Implements sequence type evaluation of self[key] to Point2D
__setitem__
Implements sequence type assignment of Point2D to self[key]
Examples:
sp = KcsPoint2D.Point2D(100.0,50.0)
polygon = KcsPolygon2D.Polygon2D(sp)
sp.X = 30.0
sp.Y = 120.0
polygon.AddPoint(sp)
sp.Y = 400.0
polygon.Addpoint(sp)
point = polygon[1]
Class KcsContour2D.Contour2D
The class holds information about contour. It is used in Vitesse functions, i.e.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 7 of 69
contour_properties_get and hatch_new in module kcs_draft or pan_curve_create in
module kcs_hull.
Parameters and attributes:
Contour
[segment]
List of contour segments. Each segment is a
list of one or two arguments. The syntax is
[startPoint, <amplitude>] where:
startPoint - Point2D at the end of
the segment
amplitude - amplitude at the midpoint
of segment (if 0 or none then segment
is a straight line)
First segment always consists of one point
only. The point is a start point of contour.
Visible
integer
Visibility:
1 : contour is visible
0 : contour is not visible.
Detectable
integer
Detect ability:
1 : contour is detectable
0 : contour is not detectable.
Colour
Colour
Colour of contour
LineType
LineType
Line type of contour. Line type must be
defined in system.
Layer
Layer
Layer of contour
Constructor:
Contour2D (startp)
startp
This constructor will create an instance of
Contour2D class
Point2D
Start point of the contour
Methods:
AddLine (point)
point
Add a line (straight) segment to the contour
Point2D
AddArc (point, amplitude)
Point at end of line
Add an arc segment to the contour
point
Point2D
Point at the end of the arc
amplitude
real
Amplitude at the midpoint of segment
SetPoint (point)
point
IsPoint ()
Reset the contour to one point
Point2D
Start point of the contour
integer
Checks if contour is a point:
1 - Contour is a point
0 - Contour is not a point
IsClosed ()
integer
Check whether the contour is closed:
1 - Contour is closed
0 - Contour is not closed
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
IsInside (point)
Page 8 of 69
integer
Check whether the point is inside the contour:
1 - The point is inside the contour
0 - The point is outside or on the
contour or the contour is not closed.
point
Point2D
Point to test
IsPointOnContour
(point)
integer
Check whether the given point is on contour:
point
Point2D
1 - The point is on the contour
0 - The point is not on the contour.
GetPointOnContour (point)
point
Point to test
Get a point on contour, which is nearest to the
given point. New point is returned in input
variable.
Point2D
Input/output point
Point2D
Get the center point of a segment given at
input
start
Point2D
Start point of the segment
end
Point2D
End point of the segment
amplitude
real
Amplitude of the segment
Distance (point)
real
Get the distance between given point on
contour and the end point of the contour
measured along contour
Point2D
Point on contour, whose distance to end point
is to be calculated
Length()
real
Get the length of contour
Area()
real
Get the area inside contour
Direction()
integer
Get the direction (orientation) of the contour:
GetCenterPoint (start,
end, amplitude)
point
-1 - Contour is clockwise
-1 - Contour is anticlockwise
Class protocols:
__repr__
Used to return string representation of Contour2D object.
__add__
Returns a sum of two contours, for example:
contC = contA + contB
Now contC is a new instance of Contour2D representing the
sum of contA and contB where contA and contB are also
instances of Contour2D.
__sub__
Returns a subtraction of two contours, for example:
contC = contA - contB
Now contC is a new instance of Contour2D representing the
subtraction of contA and contB where contA and contB are
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 9 of 69
also instances of Contour2D.
__mul__
Returns a common part of two contours, for example:
contC = contA * contB
Now contC is a new instance of Contour2D representing the
common part of contA and contB where contA and contB are
also instances of Contour2D.
Class KcsContourOperations. BooleanOperations:
The ContourOperations class holds information about two 2D dimensional# contours,
which will be used to perform operations on.
Attributes:
__contour1
Contour2D
First contour
__contour2
Contour2D
Second contour
__segments1
list
Segments list of first contour
__segments2
list
Segments list of second contour
Methods:
BooleanOperations
(constructor)
ConvertContour
Creates an instance of the class
INPUT:
Contour2D
First contour
Contour2D
Second contour
Converts contour segments to the following
representation:
(start point, end point, center point, amplitude)
INPUT:
Contour2D
GetInsideSegments
Contour to convert
Gets all segments that are inside the other contour.
INPUT:
list
GetOuterSegments
List of segments converted by
ConvertContour
Gets all segments that are outside the other contour
INPUT:
list
GetConditionalSegments
List of segments converted by
ConvertContour
Gets all segments that are in both contours.
INPUT:
list
IsOuterSegment
List of segments converted by
ConvertContour
Checks if segment is an outer segment.
INPUT:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 10 of 69
list
IsOuterPoint
Segment converted by
ConvertContour
Checks if point is an outer point.
INPUT:
Point2D
ChooseNextSegment
Point
Chooses next segment used for adding contours.
INPUT:
DifferNextSegment
list
Segment converted by
ConvertContour
list
List of priority segments converted
by ConvertContour
list
List of secondary segments
converted by ConvertContour
Chooses next segment used for subtracting contours.
INPUT:
CompositeContour
list
Segment converted by
ConvertContour
list
List of priority segments converted
by ConvertContour
list
List of secondary segments
converted by ConvertContour
Adds contours
INPUT:
list
ChooseDifStartPoint
List of intersection points
Chooses another start point when creating more than
one contour.
INPUT:
CommonContour
list
list of already used segments
converted by ConvertContour
list
list of segments converted by
ConvertContour
Finds common part(s) of two contours
INPUT:
list
DifferContour
list of intersection points
Subtracts contours.
list
list of intersection points
Class KcsConic2D.Conic2D
The class holds information about a 2D conic segment. It is used in Vitesse kcs_draft
module functions, i.e. conic_new or conic_highlight
Parameters and attributes:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 11 of 69
Start
Point2D
The start point
End
Point2D
The end point
Amplitude
Vector2D
The amplitude vector
Cff
real
The form factor. It controls the shape of the conic
and should be 0 <= Cff < 1. In mathematical
terms, a value < 0.5 will yield a ellipse, a value >
0.5 a hyperbola, while a value of exactly 0.5 will
yield a parabola.
Constructor:
Conic2D (stp,
endp, ampl,
cff)
This constructor will create instance of Conic2D class. Parameters are
defined as above.
Methods:
None
Class protocols:
__repr__
Return string representation of Conic2D object
Examples:
sp = KcsPoint2D.Point2D(100.0,100.0)
ep = KcsPoint2D.Point2D(300.0,300.0)
amp = KcsVector2D.Vector2D(1.0,2.0)
cff = 0.1
con = KcsConic2D.Conic2D(sp,ep,amp,cff)
Class KcsPoint3D.Point3D
The class holds information about a 3D point. It is the basic class for Vitesse 3D
operations.
Parameters and attributes:
X
real
x-coordinate of the point
Y
real
y-coordinate of the point
Z
real
z-coordinate of the point
Constructor:
Point3D (<x>, <y>,
<z>)
This constructor will create instance of Point3D class.
Parameters are defined as above, default values are zeros.
Methods:
DistanceToPoint(p)
p
Round (decimals)
real
Calculates straight line distance between
point and second point given as parameter
Point3D
Point to get distance to
Rounds coordinate values to a given
number of decimals.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 12 of 69
Example:
p = Point3D(103.67,203.73, 300)
p.Round(1)
print p # [X Y:103.7,203.7, 300.0]
decimals
integer
Number of decimals to round to
SetFromPoint (p)
p
Set point as a copy of other point
Point3D
Point to copy coordinates from
SetFromMidpoint
(p1, p2)
Update the point to be the midpoint of two
other points
p1
Point3D
First point
p2
Point3D
Second point
SetCoordinates
(x,y,z)
Update point coordinates. Parameters are
defined as attributes above.
Transform (tra)
Transform the point using a transformation
matrix
tra
Transformation3D
Transformation matrix
Class protocols:
__repr__
Used to return string representation of Point3D object
__cmp__
Used to compare two Point3D objects
Example:
point = KcsPoint3D.Point3D(0.0,0.0,0.0)
Class KcsVector3D.Vector3D
The class holds information about vector 3D.
Attributes:
X
Float
X-coordinate
Y
Float
Y-coordinate
Z
Float
Z-coordinate
Methods:
Class constructor:
This constructor will create instance of
Vector3D class.
Vector3D(<x>, <y>, <z>)
Coordinates are optional. Default value for
all coordinates is:
-32000
AngleToVector(v1)
Returns angle (in radians) between self and
another vector 3D v1.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 13 of 69
AngleToVectorWithSign(v1)
Returns angle (in radians) between self and
another vector 3D v1 with sign.
BlankProduct (scale)
Scale the vector length by scale value.
BoxProduct (v1, v2)
Calculates the box product between self and
other two vectors v1 and v2.
CompareVector(v1, tol)
Compares with another vector v1 and
tolerance tol.
DotProduct (v1)
Returns scalar product between self and
vector v1.
AbsoluteLargestComponentAxis()
Returns axis with largest component
absolute value. It returns:
0 for X axis,
1 for Y axis and
2 for Z axis.
Length ()
Returns length of vector.
ProjectOnLine(line3D)
Projects vector on Line3D
ProjectOnVector(v1)
Projects vector on another 3D vector v1.
ProjectOnPlane(plane)
Projects vector on Plane3D.
Rotate(angle, v1)
Rotates vector by given angle (in radians)
around another vector.
Round(decimals)
Rounds vector components to given number
of decimals.
ScalarComponentOnLine(line)
Performs scalar projection on Line3D.
SetComponents(x, y, z)
Sets vectors components.
SetFromCrossProduct(v1, v2)
Sets vectors components from cross product
of another two vectors v1 and v2.
SetFromPoints(p1, p2)
Sets vectors components from start and end
3D points p1 and p2.
SetFromVector(v1)
Sets vectors components from another 3D
vector v1
SetFromVectorDifference(v1, v2)
Sets vectors components to difference of
another two 3D vectors: v1-v2.
SetFromVectorSum(v1, v2)
Sets vectors components to sum of another
two 3D vectors: v1+v2.
SetLength(length)
Update the vector to have a certain length.
SetToUnitVector()
Update the length of vector to 1.
Transform(tra)
Transforms vector by Transformation3D
matrix.
Operators
Operators: ==, !=, <=, <, >, >=, +, -, truth
value testing
Sequential data type protocol
You can use index for accessing vector
components:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 14 of 69
v1[0] returns X component,
v1[1] returns Y component,
v1[2] returns Z component.
Example:
from KcsPoint3D import Point3D
v1 = Point3D(12, 22, 24)
v1[v1.AbsolutLargestComponentAxis()] = 0.0
print v1
Class KcsLine3D.Line3D(Point,Direction)
The class holds information about an unlimited 3D line
Parameters and attributes:
Point
Point3D
A point on the line
Direction
Vector3D
A vector along the line
Methods:
ScalarComponentOfVector
VectorComponentOfVector
Transform
Examples:
pnt = KcsPoint3D.Point3D(100.0,100.0,100.0)
dir = KcsVector3D.Vector3D(0.0, 0.0, 1.0)
line = KcsLine3D.Line3D( pnt, dir)
Class KcsPolygon3D.Polygon3D(Start)
The class holds information about a 3D polygon.
Parameters:
Start
Point3D
Start point of the polygon
Methods:
AddPoint
ClassPolygon3D.GetNoOfPoints()
The function returns number of points in polygon.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 15 of 69
ClassPolygon3D.GetPoint()
The function returns Point3D instance of polygon point selected by index (0 based).
Examples:
sp = KcsPoint3D.Point3D(100.0,50.0,0.0)
polygon = KcsPolygon3D.Polygon3D(sp)
sp.X = 30.0
sp.Y = 120.0
polygon.AddPoint(sp)
sp.Y = 400.0
polygon.Addpoint(sp
Class KcsPlane3D.Plane3D)
The class holds information about an unlimited plane. It is used by Vitesse functions i.e
view_slice_planes_get() in module kcs_draft.
Parameters and attributes:
Point
Point3D
A point on the plane
Normal
Vector3D
A vector perpendicular to the plane
Constructor:
Plane3D (pnt, norm)
This constructor will create instance of Plane3D class.
Parameters are defined as above.
Methods:
IntersectLine (line,
point)
integer
Intersects the plane with a line. If the
intersection is found it returns 0 and sets
“point” parameter to intersection point,
otherwise returns –1.
line
Line3D
The line to intersect the plane with
point
Point3D
The point to be updated with result
Transform (tra)
tra
Transforms a plane using transformation
matrix.
Transformation3D
The transformation matrix
Class protocols:
__repr__
Used to return string representation of Plane3D object.
Examples:
pnt = KcsPoint3D.Point3D(0.0,0.0,0.0)
norm = KcsVector3D.Vector3D(0.0, 1.0, 0.0)
plane = KcsPlane3D.Plane3D( pnt, norm)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 16 of 69
Class KcsCircle3D.Circle3D
The class holds information about a 3D circle.
Parameters and attributes:
Centre
Point3D
Centre of the circle
Normal
Vector3D
Normal vector to circle plane
Radius
real
Radius of the circle
Constructor:
Circle3D (centre,
normal, radius)
This constructor will create instance of Circle3D class.
Parameters are defined as above.
Class protocols:
__repr__
Used to return string representation of Circle3D object.
Examples
cp = KcsPoint3D.Point3D(100.0,100.0, 50.0)
rad = 50.0
norm = KcsVector3D.Vector3D(0,0,1)
circle = KcsCircle2D.Circle2D(cp,norm,rad)
Class KcsBox.Box
The class holds information about a 3D box. It is used i.e. with classes
KcsAssembly.Assembly, KcsVolPrimitiveBlock.VolPrimitiveBlock or with function
view_symbolic_new in module kcs_draft.
Parameters and attributes:
Origin
Point3D
Box origin
LengthDir
Vector3D
Length direction vector
HeightDir
Vector3D
Height direction vector
Length
real
Length along ‘LengthDir’ vector
Height
real
Height along ‘HeightDir’ vector
Width
real
Width along right normal of “lengthheight” plane
Constructor:
Box (origin, lengthDir, heightDir,
length, height, width)
This constructor will create instance of
Box class. Parameters are defined as
above.
Methods:
SetAxisParallelBox (lowCorner,
upCorner) or
(x1, y1, z1, x2, y2, z2)
It will create axis parallel box. Height
direction is parallel to Y axis and Length
direction is parallel to Z axis.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 17 of 69
lowCorner
Point3d
Lower-left (min z) corner of Bo
upCorner
Point3d
Upper-right (max z) corner of Box
x1, y1, z1, x2,
y2, z2
real
Corners in coordinate list format (first =
lower-left, second = upper-right)
integer
1 - Box is empty (three
dimensions are equal 0)
0 - Box is not empty
IsEmpty()
Class protocols:
__repr__
Used to return string representation of Box object.
Examples:
import KcsBox
import KcsPoint3D
import KcsVector3D
origin = KcsPoint3D.Point3D(0,0,0)
lengthDir = KcsVector3D.Vector3D(0,1,2)
heightDir = KcsVector3D.Vector3D(0,2,1)
box = KcsBox.Box(origin, lengthDir, heightDir, 45.7 , 10, 55.5)
Class KcsCap.Cap
The class holds information about a cap. The cap primitive describes a spherical
segments, i.e. a part of a sphere, cut off with plane.
Parameters and attributes:
Origin
Point3d
Cap origin
Direction
Vector3d
Cap direction vector
Diameter
real
Cap diameter
Amplitude
real
Cap amplitude
Constructor:
Cap (orig, dir, diam, ampl)
This constructor will create instance of Cap
class. Parameters are defined as above.
Class protocols:
__repr__
Return string representation of Cap object.
Example:
import KcsCap
import KcsPoint3D
import KcsVector3D
origin = KcsPoint3D.Point3D(4,5,7.8)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 18 of 69
direction = KcsVector3D.Vector3D(0,0,1)
cap = KcsCap.Cap(origin, direction, 4, 7.8)
cap.Diameter = 1
Class KcsCone.Cone
The class holds information about a cone. For the cone primitive at least one of the two
defining radii must be greater than zero.
Parameters and attributes:
Origin
Point3D
Cone origin (centre of first end circle)
Direction
Vector3D
Cone direction vector
Length
real
Cone length.
Diameter1
real
The diameter of first end circle
Diameter2
real
The diameter of second end circle
Constructor:
Cone (orig, dir, len, diam1, <diam2>)
This constructor will create instance of Cone
class. Parameters are defined as above, by
default <diam2> is equal to diam1. At least
one of the diameters must be greater then
zero.
Class protocols:
__repr__
Return string representation of Cone object.
Example:
origin = KcsPoint3D.Point3D(4,5,7.8)
direction = KcsVector3D.Vector3D(0,0,1)
cone = KcsCone.Cone(origin, direction, 20, 8, 0)
cone.Diameter2 = 1
Class KcsConnection.Connection
The class holds information about a connection.
Parameters and attributes:
Pos
Point3D
Origin of the connection
Dir
Vector3D
Direction of the connection
Type
integer
The type of the connection (1-9)
Number
integer
The number of the connection (1-199)
Descr
string
The description of the connection
Constructor:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 19 of 69
Connection (pos, dir, type,
number, <descr>)
This constructor will create an instance of
Connection class. Parameters are defined as
above, description is an empty string by default.
Class protocols:
__repr__
Return string representation of Connection object.
Examples:
pos = KcsPoint3D.Point3D(100.0,100.0, 0.0)
dir = KcsVector3D.Vector3D(1.0,2.0,3.0)
con = KcsConnection.Connection(pos, dir, 1, 50, ‘description’)
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Date and Time
These python classes handle dates and time.
Class KcsDate.Date
The class holds information about date
Parameters and attributes:
_Year
integer
Year
_MonthY
integer
Month
_Day
integer
Day
Methods:
Class constructor:
This constructor will create instance of Date class.
Date(<integer year>, <integer
month>, <integer day>)
__cmp__
Used to compare two Date objects.
__rpr__
Used to return string representation of Date object.
SetDate(year, month, day)
Sets date.
SetDate(Date)
GetDate()
Returns date as tuple containing three integers:
(year, month, day)
Example:
import KcsDate
a = KcsDate.Date(2001, 10, 10)
print a
a.SetDate(2000, 10, 11)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 20 of 69
print '%04i %02i %02i' %.GetDate()
see also:
# Example: kcs_ex_ass01.py
# Example: kcs_ex_db01.py
Class KcsTime.Time
The class holds information about time. It is used with other Vitesse classes.
Parameters and attributes:
Hour
integer
Hour part
Minute
integer
Minute part
Second
integer
Second part
Hundredths
integer
Hundredth of second
Constructor:
Time(<hour>,<min>,<sec>,<hund>)
This constructor will create instance of
Time class. Parameters are defined as
above. Default values are 0.
Methods:
SetTime (hour, min, sec, hund)
Sets time from four parts. Parameters are
defined as above.
SetTime (time)
Sets time from another Time instance.
time
GetTime ()
Time
Time object to copy
(integer,
integer,
integer,
integer)
Returns time as tuple:
(hour, minute, second, hundredths)
Class protocols:
__cmp__
Used to compare two Time objects.
__repr__
Used to return string representation of Time object.
Example:
import KcsTime
a = KcsTime.Time(05, 10, 10, 00)
print a
a.SetTime(05, 10, 11, 00)
print '%02i:%02i:%02i.%02i' %GetTime()
see also:
# Example: kcs_ex_db01.py
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 21 of 69
Class KcsDateTime.DateTime
The class holds information about date and time. This class inherits from Date and Time
classes.
Parameters and attributes:
None.
Methods:
Class
constructor:
This constructor will create instance of DateTime
class.
DateTime
(<integer
year>,
<integer
month>,
<integer
day>,
<integer
hour>,
<integer
minute>,
<integer
second>,
<integer
hundredths>)
__cmp__
Used to compare two DateTime objects.
__repr__
Used to return string representation of DateTime
object.
SetDateTime
(year, month,
day, hour,
min, sec,
hund)
Sets date time.
SetDateTime
(DateTime)
GetDateTime
()
Returns time as tuple containing seven integers:
(year, month, day, hour, minute, second,
hundredths)
Examples:
import KcsDateTime
a = KcsDateTime.DateTime(2001, 10, 19, 05, 10, 10, 00)
print a
see also:
# Example: kcs_ex_db01.py
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 22 of 69
User Interface
These python classes are of user interface type.
Class KcsButtonState.ButtonState
The class holds information about buttons states during interactive operations. It is used
in interactive functions call i.e. point2D_req in module kcs_ui.
Parameters and attributes:
LockEnabled
integer
Lock buttons state:
0 - disabled,
1 - enabled
OptionsEnabled
integer
Options button state:
0 - disabled
1 - enabled
LockChecked
string
State of lock buttons:
None - no lock button checked
‘U’ - U lock checked
‘V’ - V lock checked
Constructor:
ButtonState()
This constructor will create instance of ButtonState class. By
default all buttons are disabled/unchecked.
Class protocols:
__cmp__
Used to compare two ButtonState objects.
__repr__
Used to return string representation of ButtonState object.
Example:
import KcsButtonState
import KcsPoint2D
import kcs_ui
point = KcsPoint2D.Point2D()
buttons = KcsButtonState.ButtonState()
buttons.LockEnabled = 1
buttons.OptionsEnabled = 1
buttons.LockChecked = 'U'
kcs_ui.point2D_req('Select 2D point', point, buttons)
Class KcsCursorType.CursorType
The class holds information about cursor type used in kcs_ui.point2D_req function
Parameters and attributes:
__nType
integer
Type of cursor. This variable should not
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 23 of 69
be accessed directly.
__Arguments
list
Additional information for specified cursor
type. This variable should not be
accessed directly.
Methods:
SetCrossHairs()
This function will set cursor type to
CrossHair cursor.
SetRubberBand(point)
This function will set cursor type to
RubberBand cursor. Point specifies first
point position.
SetRubberRectangle(point)
This function will set cursor type to
RubberRectangle. Point specifies first
corner position.
SetRubberCircle(point)
This function will set cursor type to
RubberCircle. Point will specify centre of
circle.
GetCursorType()
This function will return current cursor
type. It can be:
SetDragCursor(highlight, point)
•
'CrossHair'
•
'RubberBand'
•
'RubberRectangle'
•
'RubberCircle'
This function will set cursor type to
DragCursor.
•
highlight
Instance of HighlightSet class
containing drag cursor definition
•
point
Point specifying cursor position.
Example:
center = KcsPoint2D.Point2D(0, 0)
Cursor = KcsCursorType.CursorType()
Cursor.SetRubberCircle(point)
print Cursor.GetCursorType()
Class KcsHighlightSet.HighlightSet
The class holds information defining drag cursor.
Parameters and attributes:
__Elements
list
List of elements defining highlight
set.
Methods:
AddGeometry2D(
Adds graphical 2D element to highlight
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 24 of 69
element,
<linetype>)
set.
AddGeometry3D(
element,
<handle>,
<linetype>)
•
element
instance of following classes: Arc2D,
Contour2D, Point2D, Rrectangle2D
•
linetype (KcsLinetype.Linetype )
optional parameter defining type of
line used to draw the element
Adds graphical 2D element to highlight
set.
•
AddModel( model )
element
instance
of
following
Point3D, Polygon3D
classes:
•
handle
(KcsElementHandle.ElementHandle)
Handle to view in which element is
drawn. If no handle given, element is
drawn in all model views.
•
linetype (KcsLinetype.Linetype )
optional parameter defining type of
line used to draw the element
Adds model to highlight set.
•
AddSubpicture( handle )
model (KcsModel.Model)
model information
Adds subpicture to highlight set.
•
Reset()
handle (KcsElementHandle)
handle
to
view,
subview
component
or
Removes all elements from highlight set.
Example:
highlight = KcsHighlightSet.HighlightSet()
cursor = KcsCursorType.CursorType()
highlight.AddSubpicture( handle )
cursor.SetDragCursor( highlight, refpoint )
see also:
# Example: kcs_ex_ui1.py
Class KcsStat_point2D_req.Stat_point2D_req
The class holds information about point2D selection method.
Parameters and attributes:
__CursorType
iCursorType
Type of cursor. This variable should not
be accessed directly.
__Point2dDefMode
integer
Point definition mode. This variable
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 25 of 69
should not be accessed directly.
__HelpPoint
Point2D
Help point for ModeOffsetCurrent
definition mode.
This attribute is optional.
__Scale
Real
Scale
Methods:
SetDefMode(mode)
This function will set definition mode.
Argument mode is a string that specifies
point definition mode:
•
'ModeKeyIn'
•
'ModeCursor'
•
'ModeNode'
•
'ModeExist'
•
'ModeSymbConnection'
•
'ModeAuto'
•
'ModeArcAtAngle'
•
'ModeArcCentre'
•
'ModeDistanceAlong'
•
'ModeMidPoint'
•
'ModeIntersect'
•
'ModeOffsetCurrent'
•
'ModeNearest'
•
'ModeCOG'
• 'ModeEvent'
These names are defined in
KcsStat_point2D_req.Point2dDefModes
dictionary.
GetDefMode()
This function will return name of selected
definition mode.
Look at
KcsStat_point2D_req.Point2dDefModes
dictionary for definition modes names.
SetCursorType(CursorType)
This function will set cursor type to
specified by CursorType instance of
KcsCursorType.CursorType class.
GetCursorType()
This function will return current cursor
type as instance of
KcsCursorType.CursorType class.
SetHelpPoint(point)
This function will set help point for
ModeOffsetCurrent point definition mode.
SetHelpPoint(None)
Note that user can select mode to
ModeOffsetCurrent during selection so
if this point will be None then mode will
be greyed on point definition mode
toolbar.
Use SetHelpPoint(None) to delete existing
help point.
GetHelpPoint()
This function will return currently defined
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 26 of 69
help point. If no point is defined it will
return python None value.
SetScale(scale)
SetScale(None)
Set scale. If None scale will be fetched
from current subpicture.
GetScale()
Returns scale value.
Example:
CursorType = KcsCursorType.CursorType()
CursorType.SetRubberCircle(KcsPoint2D.Point2D(100, 100))
Status = KcsStat_point2D_req.Stat_point2D_req()
Status.SetCursorType(CursorType)
Status. SetDefMode('ModeOffsetCurrent')
Status.SetHelpPoint(KcsPoint2D.Point2D(0, 0))
point = KcsPoint2D.Point2D();
kcs_ui.point2D_req('Select point', point, Status)
print Status.GetDefMode()
Class KcsStat_point3D_req. Stat_point3D_req()
The class holds information about some initial status when defining a 3D point, using the
point3D_req function.
Attributes:
Helpdef
integer
Help point defined?
= 0 No (default)
= 1 Yes
Helppnt
Point3D
The help point (if defined)
Lockstatic
integer
Initial lock protected?
= 0 No (default)
= 1 Yes
Locktype
integer
Type of lock:
= 0 No lock (default)
=1 Lock plane
= 2 Lock line
Lockpnt
Point3D
A point through the plane/line (if lock)
Lockvec
Vector3D
A vector perpendicular to the plane /
parallel to the line (normalised) (if lock)
Initial3D
integer
The initial way of defining the 3D point:
= 1 Pick line (by indicating in a view)
= 2 Key in
= 3 Indicate event point (default)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 27 of 69
= 4 Offset from current (the help
point)
Initial2D
integer
The initial way of defining a 2D point (used
by Pick Line)
= 1 Key in (2D)
= 2 Cursor position (default)
= 3 End or node point
= 4 Existing point
= 5 Symbol connection
= 6 Auto point
= 7 Point on arc at angle
= 8 Arc centre
= 9 Point at distance along
= 10 Mid point
= 13 Intersecting point
= 20 Offset from current point
= 21 Closest segment point
= 22 Centre of gravity
= 23 Event point (2D)
Methods:
None
Examples (to enable lock line) :
status = KcsStat_point3D_req.Stat_point3D_req()
status.Locktype = 2
status.Lockpnt = KcsPoint3D.Point3D(1000.0,2000.0,1500.0)
.Lockvec = KcsPoint3D.Point3D(1.0,0.0,0.0)
status
status.Initial3D = 1
status.Initial2D = 3
## Pick line
## End/node point
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Miscellaneous
These python classes are of miscellaneous types.
Class KcsTransformation3D.Transformation3D()
The class holds information about a 3D transformation matrix
Attributes:
Type
integer
Type of transformation matrix:
= 0 Unknown type of matrix
= 1 Matrix does not contain general
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 28 of 69
scaling or projection
= 2 Matrix contains general scaling
= 3 Matrix contains projection
element(1,1) in the matrix
Matrix11
real
.
.
Matrix44
real
element(4,4) in the matrix
Methods:
SetFromTransformation
Combine
GetByRow
SetByRow
SetFromPointAndTwoVectors
SetFromPointAndThreeVectors
Invert
ReflectX
ReflectY
ReflectZ
Rotate
Translate
Examples:
orig = KcsPoint3D.Point3D(0.0,0.0,0.0)
Uvec = KcsVector3D.Vector3D(1.0, 0.0, 0.0)
Vvec = KcsVector3D.Vector3D(0.0, 1.0, 0.0)
trvec = KcsVector3D.Vector3D(0.0, 1000.0, 2000.0)
trmat= KcsTransformation3D.Transformation3D()
trmat. SetFromPointAndTwoVectors( orig, Uvec, Vvec)
trmat.Translate(trvec)
Class KcsStringlist.Stringlist(Initstring)
The class holds information about a list of strings.
Parameters:
Initstring
string
The first string in the list
Methods:
AddString
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 29 of 69
Examples:
str = 'First string'
list = KcsStringlist.Stringlist(str)
str = 'Second string'
list.AddString(str)
Class KcsSymbollist.Symbollist(FontId,SymbNo)
The class holds information about a list of symbols, each represented by an integer pair
denoting the font identification and the symbol number within that font.
Parameters:
FontId
integer
First symbol: The font identification
SymbNo
integer
First symbol: The symbol number within the
font
Methods:
AddSymbol
Examples:
fontid = 23
symbno = 1
list = KcsSymbollist.Symbollist( fontid, symbno)
fontid = 66
symbno = 16
list.AddSymbol(fontid, symbno)
Class KcsColour.Colour)
The class holds information about a specific colour. It is used in Vitesse functions i.e.
colour_set in module kcs_draft or colour_select in module kcs_ui.
Parameters and attributes:
ColourString
string
The name of the colour
Valid colours are:
"White"
"Cyan"
"Blue"
"Magenta"
"Red"
"Yellow"
"Green"
"Black"
"Wheat"
"MediumAquamarine"
"NavyBlue"
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 30 of 69
"DarkOrchid"
"FireBrick"
"Orange"
"ForestGreen"
"DimGrey"
"Tan"
"Aquamarine"
"SlateBlue"
"Violet"
"IndianRed"
"Gold"
"LimeGreen"
"Grey"
"Sienna"
"Turquoise"
"LightBlue"
"BlueViolet"
"Pink"
"Coral"
"SpringGreen"
"LightGrey"
Constructor:
Colour
(colourString)
This constructor will create instance of Colour class. Parameter is
defined as above.
Class protocols:
__repr__
Used to return string representation of Colour object.
Examples:
col1 = KcsColour.Colour("Violet")
col1_str = col1.ColourString
col2 = KcsColour.Colour()
col2.ColourString = col1_str
Class KcsLinetype.Linetype(LinetypeString)
The class holds information about a specific line type.
Parameters and attributes:
LinetypeString
string
The name of the line type.
Alias names can be used as well as system
names. To get all linetype names use
GetLinetypes() function in KcsLinetype
module. It will return python dictionary
containing pairs: system name - alias name.
There are also two other useful functions in
KcsLinetype module:
GetAliasName(name) - returns alias
name for given system name,
GetSystemName(name) - returns
system name for given alias name.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 31 of 69
Methods:
SetName
Name
Examples:
# get system name for first alias name
aliases = KcsLinetype.GetLinetypes()
SysName = KcsLinetype.GetSystemName(aliases[0])
# create instances of Linetype class
lt1 = KcsLinetype.Linetype(SysName)
lt1_str = lt1.Name()
lt2 = KcsLinetype.Linetype()
lt2.SetName( lt1_str)
Class KcsModel.Model(Type,Name)
The class holds information about a specific model
Parameters and first two attributes:
Type
string
The model type.
Valid types are:
"plane panel"
"hull curve"
"longitudinal"
"transversal"
"subsurface"
"lines fairing curve"
“space general”
“weld table”
Name
string
The model name.
string
The model part type.
Remaining attributes:
PartType
Valid types are:
"panel"
"boundary"
"hole"
"bracket"
"plate"
"notch"
"seam"
"stiffener"
"flange"
"pillar"
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 32 of 69
"bead"
"cutout"
"excess"
"hole/notch/cutout"
"point"
"curve"
“welded joint”
"unknown"
PartId
integer
The model part ID
SubPartType
string
The model subpart type.
Valid types are:
""
"limit"
“crossmark”
SubPartId
integer
The model subpart ID
ReflCode
integer
Reflection code (relevant for Hull).
Valid codes are:
0 = not reflected
1 = reflected
Methods:
SetType
Type
SetName
Name
PartType
PartId
SubPartType
SubPartId
ReflCode
Class KcsModelDrawAssyCriteria. ModelDrawAssyCriteria
The class holds information about assembly that will be drawn.
Parameters and attributes:
__Name
string
Name of assembly object.
__Recursive
integer
Recursive/Parts mode flag.
__Criteria
dictionary
Selection criteria for model types.
Methods:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 33 of 69
Class constructor:
This constructor will create instance of
ModelDrawAssyCriteria(<name>)
ModelDrawAssyCriteria class.
name - is an assembly name. This
parameter is optional.
SetAssemblyName(name)
Sets name of assembly object.
GetAssemblyName()
Returns name of assembly object.
IsRecursive()
Returns 1 if Recursive mode is selected. If it
is 0 Parts mode is selected.
SetRecursive(mode)
Sets mode flag to:
Recursive - if mode is 1
Parts - if mode is 0
EnableModelType(type, value)
Enables(value=1) or disables(value=0)
given model type. As type one of the
following names should by used:
'PlanePanel', 'CurvedPanel', 'Pipe',
'Equipment', 'Cableway', Structure',
'PlacedVolume' or 'Ventilation'.
IsModelTypeEnabled(type)
Returns 1 if given type is enabled,
otherwise it will return 0.
Combine(transf)
Performs combination of two
transformations. Combines self with another
transformation matrix given by transf which
is another instance of Transformation2D
class.
Invert()
Performs inversion of transformation matrix.
Example:
criteria = KcsModelDrawAssyCriteria. ModelDrawAssyCriteria ('BL-M902');
criteria.SetRecursive(1)
mode
# Recursive
criteria.EnableModelType('PlanePanel', 0)................ # Exclude
PlanePanels from selection
kcs_draft.model_draw(criteria) .......................... # draw model
see also:
# Example: kcs_ex_draft33.py
Class KcsObject.Object
The class holds information about database object.
Parameters and attributes:
__Name
string
Name of object.
__Code1
integer
Object code 1.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 34 of 69
__Code2
integer
Object code 2
__DateTime
DateTime
Creation date and time.
__Size
integer
Size of object given in number of blocks (1
block = 512 bytes)
Methods:
Class constructor:
Object()
This constructor will create instance of
Object class.
__cmp__
Used to compare two Object instances.
__repr__
Used to return string representation of
Object instance.
SetName(string)
Sets database object name.
GetName()
Returns name of database object.
SetCode1(integer)
Sets database object code 1.
GetCode1()
Returns database object code 1.
SetCode2(integer)
Sets database object code 2.
GetCode2()
Returns database object code 2.
__SetSize(integer)
For internal use only.
GetSize()
Returns object size in blocks.
SetCreationDate(DateTime)
Sets creation date.
GetCreationDate()
Returns creation date as DateTime
instance.
Example:
import KcsObject
a = KcsObject.Object(05, 10, 10, 00)
print a
a.SetName('SP162-2')
print a
see also:
# Example: kcs_ex_db01.py
Class KcsObjectCriteria.ObjectCriteria
The class holds information about database object selection criteria.
Parameters and attributes:
__Name
string or
Name of object given with wildcards.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 35 of 69
None
__Code1
integer or
None
Object code 1.
__Code2
integer or
None
Object code 2
__DateTime
tuple or
None
Date and time criteria. Stored as:
tuple or
None
Size criteria. Stored as:
__Size
1. (DateTime, DateTime)
2. (integer, DateTime)
3. None
1. (integer, integer)
2. None
Methods:
Class constructor:
ObjectCriteria()
This constructor will create instance of ObjectCriteria
class. All criteria are set to None so all objects match
criteria.
__cmp__
Used to compare two ObjectCriteria instances.
__repr__
Used to return string representation of ObjectCriteria
instance.
SetName(string)
Sets name criteria or deletes it.
SetName(None)
GetName()
Returns name criteria or None if not set.
SetCode1(integer)
Sets code1 criteria or deletes it.
SetCode1(None)
GetCode1()
Returns code1 criteria or None if not set.
SetCode2(integer)
Sets code2 criteria or deletes it.
SetCode2(None)
GetCode2()
Returns code2 criteria or None if not set.
SetSize(integer size)
Sets size criteria:
SetSize(string type, integer
size)
1. Type will be set to '='
2. Size and type selected by user
3. Criteria will be deleted
SetSize(None)
Defined types for that criteria are in:
ObjectCriteria.SignDefinition tuple.
GetSize()
Returns tuple:
(string type, integer size)
or None if not defined.
SetCreationDate(DateTime
start, DateTime end)
SetCreationDate(string type,
DateTime date)
SetCreationDate(None)
Sets creation date criteria:
1. Between dates
2. Depending on type
3. No criteria
Defined types for that criteria are in:
ObjectCriteria.SignDefinition tuple.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 36 of 69
GetCreationDate()
Returns tuple:
1. (DateTime, DateTime)
2. (string type, DateTime)
or None if not defined.
Example:
import KcsObjectCriteria
from KcsDateTime import DateTime
a = KcsObjectCriteria.ObjectCriteria()
print a
a.SetName("PLANE*")
a.SetCreationDate('>=', DateTime(2000, 10, 19, 23, 00, 00, 00))
a.SetSize('<', 100)
print a
see also:
# Example: kcs_ex_db01.py
Class KcsPrintOptions.PrintOptions(printername)
The class holds information about print options.
Parameters and attributes:
PrinterName
string
Printer name, empty means to use currently
selected on
Orientation
integer
Page orientation,
0 - Currently selected
1 - Portrait
2 - Landscape
PrintToFile
integer
Activity of print-to-file option:
0 - print-to-file option set to false
1 - print-to-file option set to true
FileName
String
File name for print result if print-to-file option
is active.
NoOfCopies
integer
Number of copies. If it is 0 than currently
value will be used.
EffPrintArea
integer
Effective print area:
0 - Currently selected
1 - Drawing Form
2 - Drawing Extension
3 - Current Window
AutoOrient
integer
Auto-orientation flag:
0 - Use current state of flag
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 37 of 69
1 - Activate option
2 - Deactivate option
ScaleToFit
integer
Scale-to-fit flag:
0 - Use current state of flag
1 - Activate option
2 - Deactivate option
Scale
real
Scale value (valid only if Scale-to-fit is not
selected):
Figure 4:1.
0 - Use current value
Figure 4:2. >0 - new value for scale
printername
string
Initial value for PrinterName
Methods:
SetPrinterName
GetPrinterName
SetOrientation
GetOrientation
SetPrintToFile
IsPrintToFile
SetNumberOfCopies
GetNumberOfCopies
SetEffectivePrintArea
GetEffectivePrintArea
SetAutoOrient
GetAutoOrient
SetScaleToFit
GetScaleToFit
SetScale
GetScale
SetFileName
GetFileName
Example:
options = KcsPrintOptions.PrintOptions('\\ntsvr7\p015');
options.SetOrientation(1)
options.SetScaleToFit(1)
kcs_draft.dwg_print(options)
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 38 of 69
see also:
# Example: kcs_ex_draft27.py
Class KcsTransformation2D.Transformation2D()
The class holds information 2D transformation.
Parameters and attributes:
__type
integer
Type of transformation matrix. It is for
internal use so if any transformation
methods will be added to this class take
care of setting this variable to correct value.
0 = Undefined transformation
1 = Identity transformation
2 = Transformation may also consist
of translations.
3 = Transformation may also consist
of rotations.
4 = Transformation may also consist
of uniform scalings.
5 = Transformation may also consist
of reflections.
6 = Transformation may also consist
of general scalings.
7 = Transformation may also consist
of skews (shears).
8 = Transformation may also consist
of parallel projection.
9 = Transformation may also consist
of central projection.
__matrix
list of reals
Transformation matrix.
Methods:
__Set(Row, Col, Value)
Sets matrix item at Row and Col to Value.
Row and Col must be value from 0 to 2.
__Get(Row, Col)
Gets matrix item at Row and Col.
Row and Col must be value from 0 to 2.
__Decompose()
Decomposes transformation matrix to linear
transformations as: scale, rotation,
translation etc.
IdentityTransf()
Initializes identity matrix.
Translate(vector2D)
Performs translation about vector vector2D
which is an instance of Vector2D class.
Rotate(center, angle)
Performs rotation about centre (instance of
Point2D) and angle given in radians.
Scale(factor)
Performs uniform scaling by given factor.
Reflect(point2D, vector2D)
Performs reflection in a given line.
Line is given by point2D and direction
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 39 of 69
vector vector2D.
Combine(transf)
Performs combination of two
transformations. Combines self with another
transformation matrix given by transf which
is another instance of Transformation2D
class.
Invert()
Performs inversion of transformation matrix.
GetScale()
Returns scale factors for x and y axis as
tuple of two reals.
GetXYShear()
Returns XY shear factor.
GetTranslation()
Returns translation in x and y axis as tuple
of two reals.
GetRotation()
Returns rotation in radians.
GetReflection()
Returns reflection factor.
Example:
transformation = KcsTransformation2D.Transformation2D();
center = KcsPoint2D.Point2D(10, 10)
angle = (3.1415/180) * 45........................... # 45 degrees
transformation.Rotate(center, angle)................ # rotate
transformation.Scale(2.0)........................... # and scale
kcs_draft.element_transform(handle, transformation). # transform
element
see also:
# Example: kcs_ex_draft31.py
# Example: kcs_ex_draft34.py
Class KcsCaptureRegion2D.CaptureRegion2D()
The class holds information about 2D capture region. It is used in Vitesse capturing
functions i.e. model_capture and geometry_capture in module kcs_draft.
Parameters and attributes:
Inside
integer
Side of capturing region. If 0 all inside of
contour will be included, if 1 all outside
will be included.
Cut
integer
Intersection flag. If 0 geometry
intersecting the capturing region will not
be included, if 1 geometry intersecting the
capture region will be included.
Infinite
integer
Infinite flag. Set to 1 if region is infinite.
Reset to 0 by SetRectangle and
SetContour functions.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 40 of 69
Rect
integer
Contour type flag. Set to 1 by
SetRectangle function and reset to 0 by
SetContour function (readonly as object
variable).
Contour
Contour2D
Contour defining boundary of region. Set
by SetRectangle and SetContour
functions (readonly as object variable).
Constructor:
This constructor will create
instance of CaptureRegion2D
class (flags set to 1: Inside,
Infinite, flags reset to 0: Cut, Rect).
CaptureRegion2D()
Methods:
SetRectangle
(rect)
rect
Sets the region based on given rectangle.
It sets Contour attribute with input
rectangle contour, sets Rect flag to 1 and
resets Infinite flag to 0.
Rectangle2D
Capturing rectangle
SetContour (cont)
cont
Sets the region based on given contour. It
sets Contour attribute with input contour,
resets Rect and Infinite flags to 0.
Contour2D
Capturing contour
Class protocols:
__repr__
Returns string representation of CaptureRegion2D object.
Example:
point1 = KcsPoint2D.Point2D(0, 0)
point2 = KcsPoint2D.Point2D(100, 100)
rectangle = KcsRectangle2D.Rectangle2D(point1, point2)
region = KcsCaptureRegion2D.CaptureRegion2D()
region.SetRectangle(rectangle)
region.Inside = 1
region.Cut = 0
Class KcsLayer.Layer(layerid)
The class holds information about layer element.
Parameters and attributes:
__LayerId
integer
Layer id.
layerid
integer
Initial value for __LayerId attribute.
Methods:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 41 of 69
SetLayer
GetLayer
GetDescription
Example:
layer = KcsLayer.Layer(2)
print (layer.GetDescription())
Class KcsSymbol.Symbol(fontid, symbolid)
The class holds information about symbol element.
Parameters and attributes:
__Visible
integer
Visibility. If 1 symbol is visible, if 0 not.
__Detectable
integer
Detectability. If 1 symbol is detectable, if 0 not.
__Colour
Colour
Colour
__LineType
LineType
LineType
__Layer
Layer
Layer
__Position
Point2D
Position of symbol element.
__Height
real
Height of symbol element.
__Rotation
real
Rotation of symbol element (in degrees).
__Reflection
integer
Reflection of symbol element.
__SymbolId
integer
Symbol id of symbol element.
__FontId
integer
Font id of symbol element.
Fontid
integer
Initial value for __FontId attribute.
Symbolid
integer
Initial value for __SymbolId attribute.
Methods:
SetFontId
GetFontId
SetSymbolId
GetSymbolId
SetDetectable
IsDetectable
SetColour
GetColour
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 42 of 69
SetLineType
GetLineType
SetLayer
GetLayer
SetPosition
GetPosition
SetHeight
GetHeight
SetRotation
GetRotation
SetVisible
InVisible
SetReflectionInUAxis
IsReflectedInUAxis
SetReflectionInVAxis
IsReflectedInVAxis
SetNoReflection
IsReflected
Example:
symbolElement = KcsSymbol.Symbol(21, 2)
symbolElement.SetVisible(1)
reflectedInU = symbolElement.IsFeflectedInUAxis()
Class KcsText.Text(text)
The class holds information about text element.
Parameters and attributes:
__Visible
integer
Visibility. If 1 text is visible, if 0 not.
__Detectable
integer
Detectability. If 1 text is detectable, if 0 not.
__Colour
Colour
Colour
__LineType
LineType
LineType
__Layer
Layer
Layer
__Position
Point2D
Position of text element.
__Height
real
Height of text element.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 43 of 69
__Rotation
real
Rotation of text element (in degrees).
__Aspect
real
Aspect ratio of text element.
__Slanting
real
Slant ratio of text element.
__Font
string
Font of text element.
__String
string
String of text element.
text
string
Parameter which defines initial __String value.
Methods:
SetString
GetString
SetVisible
IsVisible
SetDetectable
IsDetectable
SetColour
GetColour
SetLineType
GetLineType
SetLayer
GetLayer
SetPosition
GetPosition
SetHeight
GetHeight
SetRotation
GetRotation
SetAspect
GetAspect
SetSlanting
GetSlanting
SetFont
GetFont
Example:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 44 of 69
text = 'example text'
textElement = KcsText.Text(text)
textElement.SetVisible(1)
aspect = textElement.GetAspect()
Class KcsInterpretationObject.SymbolicView
The class holds information about symbolic view
Parameters and attributes:
__ViewName
string
View name
__Looking
constant
Looking mode. Can be one of:
__PlaneType
constant
•
SymbolicView.LOOKING_FOR
•
SymbolicView.LOOKING_AFT
•
SymbolicView.LOOKING_PS
•
SymbolicView.LOOKING_SB
•
SymbolicView.LOOKING_TOP
•
SymbolicView.LOOKING_BOT
Plane type. Can be one of:
•
SymbolicView.PLANE_BY_X
•
SymbolicView.PLANE_BY_Y
•
SymbolicView.PLANE_BY_Z
•
SymbolicView.PLANE_BY_3POINTS
•
SymbolicView.PLANE_BY_PANEL
•
SymbolicView.PLANE_BY_CURVE
•
SymbolicView.PLANE_BY_RSO
__Origin
Point3D
Origin point for plane definition
__UAxis
Point3D
Uaxis for plane definition
__VAxis
Point3D
Vaxis for plane definition
__DepthBefore
real
Depth before
__DepthAfter
real
Depth after
__ObjectName
string
Panel, curve or RSO object name
__CompType
constant
Object type. Can be one of:
•
SymbolicView.TYPE_PANEL
•
SymbolicView.TYPE_BRACKET
•
SymbolicView.TYPE_STIFFENER
•
SymbolicView.TYPE_FLANGE
__CompNo
integer
Number of component if object type different than
SymbolicView.TYPE_PANEL
__Reflect
integer
Reflection flag
__OnlyCurrent
integer
Only current panel flag
__LimMin
Point3D
Lower corner of box limits
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 45 of 69
__LimMax
Point3D
Upper corner of box limits
__ViewType
constant
View type. Can be one of:
__ShellCurveType
constant
•
SymbolicView.VIEW_DESIGN
•
SymbolicView.VIEW_ASSEMBLY
Shell curve type. Can be one of:
•
SymbolicView.CURVE_EXISTING
•
SymbolicView.CURVE_BY_NAME
•
SymbolicView.CURVE_CUT
•
SymbolicView.CURVE_NONE
__DrawRSO
Integer
Draw RSO flag
__ShellProfiles
Integer
Shell profiles flag
__ShellSeams
Integer
Shell seams flag
__DrawPlaneViews
Integer
Draw plane views flag
__DrawIntersections
Integer
Draw intersections flag
__AutomaticSelection
Integer
Automatic selection flag
__DrawAsPlate
Integer
Draw as plate flag
__PanelsFilter
List
List of panels
__PanelsExclude
Integer
Panels exclude flag
__BlocksFilter
List
List of blocks
__BlocksExclude
Integer
Blocks exclude flag
__ShellCurves
List
List of shell curves
__Assemblies
List
List of assemblies
Methods:
SetViewName(string)
Sets to set view name.
GetViewName()
Returns view name.
SetPlaneByX(real)
Sets plane by X coordinate. X coordinate is stored
in Origin point.
SetPlaneByY(real)
Sets plane by Y coordinate. Y coordinate is stored
in Origin point.
SetPlaneByZ(real)
Sets plane by Z coordinate. Z coordinate is stored
in Origin point.
SetPlaneBy3Points(Point3D,
Point3D, Point3D)
Sets plane by giving 3 points: origin, uaxis, vaxis.
SetPlaneByPanel(panel,
object_type, reflect, onlycurrent)
Sets plane giving panel name. Object type can be
one of: see description of __CompType attribute.
Reflect and only current are true/false flags.
SetPlaneByCurve(curve, reflect)
Sets plane giving curve name. Reflect is a
true/false flag.
SetPlaneByRSO(rsoobject,
Sets plane giving rso object name and component
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 46 of 69
compno)
number.
GetPlaneType()
Returns plane type. See description of
__PlaneType attribute for possible values.
IsReflect()
Returns status of __Reflect flag.
IsOnlyCurrent()
Returns status of __OnlyCurrent flag.
GetComponentNo()
Returns component number.
GetComponentType()
Returns component type. See description of
__CompType for possible values.
GetObjectName()
Returns name of object (panel, curve, rsoobject)
SetLooking(looking)
Sets looking mode. See description of __Looking
attribute for possible values.
GetLooking()
Returns looking mode. See description of
__Looking attribute for possible values.
SetDepth(before, behind)
Sets depth values.
GetDepth()
Returns depth as tuple: (before, behind)
SetLimits(min3d, max3d)
Sets box limits by two 3D points.
GetLimits()
Returns box limits as tuple of two 3D points:
(min3d, max3d)
SetViewType(viewtype)
Sets view type. See description of __ViewType
attribute for possible values.
GetViewType()
Returns view type. See description of __ViewType
attribute for possible values.
SetShellCurves(curvetype, curves=
[])
Sets shell curves. See description
of__ShellCurveType attribute for possible values
of curve type. List of curves must be specified
only if type of curve is:
SymbolicView.CURVE_BY_NAME
GetShellCurveType()
Returns curve type. See description of
__ShellCurveType attribute for possible values.
GetShellCurves()
Returns list of curve names.
SetDrawRSO(integer)
Sets status of Draw RSO flag.
GetDrawRSO()
Returns status of Draw RSO flag.
SetShellProfiles(integer)
Sets status of Shell Profiles flag.
GetShellProfiles()
Returns status of shell profiles flag.
SetShellSeams(integer)
Sets status of Shell Seams flag.
GetShellSeams()
Returns status of Shell Seams flag.
SetDrawPlaneViews(integer)
Sets status of Draw Plane Views flag.
GetDrawPlaneViews()
Returns status of Draw Plane Views flag.
SetDrawIntersections(integer)
Sets status of Draw Intersections flag.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 47 of 69
GetDrawIntersections()
Returns status of Draw Intersections flag.
SetAutomaticSelection(integer)
Sets Automatic Selection flag.
GetAutomaticSelection()
Returns status of Automatic Selection flag.
SetDrawAsPlate(integer)
Sets Draw As Plate flag.
GetDrawAsPlate()
Returns status of Draw As Plate flag.
SetPanelsFilter(panels, exclude=0)
Sets panels filter by list of panels name and
exclude flag.
GetPanelsFilter()
Returns status of panels filter. The method returns
tuple: (list of panels names, exclude flag)
SetBlocksFilter(blocks, exclude=0)
Sets blocks filter by list of blocks name and
exclude flag.
GetBlocksFilter()
Returns status of blocks filter. The method returns
tuple: (list of blocks names, exclude flag)
SetAssemblies(assemblies)
Sets assemblies list. Valid only for ASSEMBLY
view.
GetAssemblies()
Returns list of assemblies.
Class KcsInterpretationObject.CurvedPanelView
The class holds information about a curved panel view.
Parameters and attributes: ([]Default setting)
Seams
integer
Seams in view [1=Yes]/0=No
SeamNames
integer
Seam names in view [1=Yes]/0=No
Plates
integer
Plates in view [1=Yes]/0=No
Material
integer
Material specification in view 1=Yes/
[0=No]
Stiffeners
integer
Stiffeners in view [1=Yes]/0=No
StiffNames
integer
Stiffener profile names in view 1=Yes/
[0=No]
ShellStiffNames
integer
Shell stiffener names in view 1=Yes/
[0=No]
PartNames
integer
Part names (stiffener) in view 1=Yes/
[0=No]
Endcuts
integer
Display endcuts in view 1=Yes/[0=No]
Jigs
integer
Display jigs in view [1=Yes]/0=No
Heights
integer
Display jig heights in view 1=Yes/[0=No
FrameCurves
integer
Frame curves in view 1=Yes/[0=No]
FrameCurvesNames
integer
Names of frame curves in view 1=Yes/
[0=No]
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 48 of 69
DirectionMarks
integer
Direction marks in view 1=Yes/[0=No]
HoleCrossMarks
integer
Hole crossmarks in view 1=Yes/[0=No]
Methods:
Property set/get methods.
SetSeams (integer)
GetSeams ()
SetSeamsNames (integer)
GetSeamsNames ()
SetPlates (integer)
GetPlates ()
SetMaterial (integer)
GetMaterial ()
SetStiffeners (integer)
GetStiffeners ()
SetStiffNames (integer)
GetStiffNames ()
SetEndcuts (integer)
GetEndcuts ()
SetJigs (integer)
GetJigs ()
SetHeights (integer)
GetHeights ()
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Weld
These python classes are used in connection with the kcs_weld interface.
Class KcsWeldTable.WeldTable
The class holds information about a weld table.
Parameters and attributes:
__WeldTableName
String
Name of weld table object
__WeldTableComment
String
Weld table comment
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 49 of 69
__TotalWeldLength
Real
Total weld length
__TotalSuspensionLength
Real
Total suspension length
__WeldedJoints
list of WeldedJoint
Welded joint data
Methods:
Class constructor:
This constructor will create an
instance of WeldTable class.
WeldTable()
SetWeldTableName(string)
Sets weld table name
GetWeldTableName()
Returns weld table name
SetWeldTableComment(string)
Sets weld table comment
GetWeldTableComment()
Returns weld table comment
SetTotalWeldLength(real)
Sets the total weld length
GetTotalWeldLength()
Returns total weld length
SetTotalSuspensionLength(real)
Sets total suspension length
GetTotalSuspensionLength()
Returns total suspension length
SetWeldedJoint(int,WeldedJoint)
Sets the given welded joint
GetWeldedJoint(int)
Returns the given welded joint
GetNumberWeldedJoints()
Returns number of welded joints
AddWeldedJoint(WeldedJoint)
Adds the welded joint
Example:
import KcsWeldTable
wt = KcsWeldTable.WeldTable()
wt.SetWeldTableComment("weld table comment")
Class KcsWeldedJoint.WeldedJoint
The class holds information about a welded joint.
Parameters and attributes:
__JointName
string
Name of joint
__JointComment
string
Joint comment
__WeldType
string
Weld type
__JointLength
real
Joint length
__SuspensionLength
real
Suspension length
__Assembly1
string
Assembly name for first part
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 50 of 69
__Assembly2
string
Assembly name for second part
__Part1
string
First part
__Part2
string
Second part
__Type1
integer
Type for first part
__Type2
integer
Type for second part
__Welds
list of Weld
Weld data
Methods:
Class constructor:
This constructor will create an instance of
WeldedJoint class
WeldedJoint()
SetJointName(string)
Sets welded joint name
GetJointName()
Returns welded joint name
SetJointComment(string)
Sets welded joint comment
GetJointComment()
Returns welded joint comment
SetWeldType(string)
Sets weld type. Use one of the following
types: 'fillet', 'butt'.
GetWeldType()
Returns weld type
SetJointLength(real)
Sets welded joint length
GetJointLength()
Returns welded joint length
SetSuspensionLength(real)
Sets welded joint suspension length
GetSuspensionLength()
Returns welded joint suspension length
SetAssemblyName(int, string)
Sets assembly name for the given part
GetAssemblyName((int)
Returns assembly name for the given part
SetPartName(int, string)
Sets name of the given part
GetPartName(int)
Returns name of the given part
SetPartType(int)
Sets type of the given part
GetPartType(int)
Returns type of the given part
GetNumberWelds()
Returns number of welds in welded joint
SetWeld(int, Weld)
Sets the given weld
GetWeld(int)
Returns the given weld
AddWeld(Weld)
Adds the weld
Example:
import KcsWeldTable
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 51 of 69
import KcsWeldedJoint
wt = KcsWeldTable.WeldTable()
wj = wt.GetWeldedJoint( 1)
wj.SetJointComment("joint comment")
Class KcsWeld.Weld
This class holds information about a weld.
Parameters and attributes:
__WeldName
string
Name of weld
__WeldComment
string
Weld comment
__WeldLength
real
Weld length
__LegLength
real
Weld leg length
__Layers
integer
Number of weld layers
__Position
string
Weld position
__TestProcedure
string
Test procedure
__Process
string
Process
__StandardProcess
string
Standard process
__StartSuspension
real
Start suspension
__EndSuspension
real
End suspension
__ConnectionAngle
real
Connection angle
__RotationAngle
real
Rotation angle
__InclinationAngle
real
InclinationAngle
__TorchVector
Vector3D
Torch vector
__BevelPart1
real
Bevel code, first part
__BevelPart2
real
Bevel code, second part
__ThicknessPart1
real
Thickness, first part
__ThicknessPart2
real
Thickness, second part
__Geometry
GeoContour3D
Weld geometry
Methods:
ClassConstructor:
This constructor will create an instance of
Weld class
Weld()
SetWeldName(int, int)
Set the weld name
GetWeldName()
Returns the weld name
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 52 of 69
SetWeldComment(string)
Sets weld comment
GetWeldComment()
Returns weld comment
SetWeldLength(real)
Sets the weld length
GetWeldLength()
Returns weld length
SetLegLength(real)
Sets weld leg length
GetLegLength()
Returns weld leg length
SetLayers(int)
Sets number of weld layers
GetLayers()
Returns number of weld layers
SetPosition(string)
Sets weld position
GetPosition()
Returns weld position
SetTestProcedure(string)
Sets weld test procedure
GetTestProcedure()
Returns weld test procedure
SetProcess(string)
Sets weld process
GetProcess()
Returns weld process
SetStandardProcess(string)
Sets weld standard process
GetStandardProcess()
Returns weld standard process
SetStartSuspension(real)
Sets start suspension
GetStartSuspension()
Returns start suspension
SetEndSuspension(real)
Sets end suspension
GetEndSuspension()
Returns end suspension
SetConnectionAngle(real)
Sets connection angle
GetConnectionAngle()
Returns connection angle
SetRotationAngle(real)
Sets rotation angle
GetRotationAngle()
Returns rotation angle
SetInclinationAngle(real)
Sets inclination angle
GetInclinationAngle()
Returns inclination angle
SetTorchVector(Vector3D)
Sets torch vector
GetTorchVector()
Returns torch vector
SetBevelCode(int,real)
Sets bevel code for the given part
GetBevelCode(int)
Returns bevel code for the given part
SetThickness(int,real)
Sets thickness for the given part
GetThickness(int)
Returns thickness for the given part
Example:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 53 of 69
import KcsWeldTable
import KcsWeldedJoint
import KcsWeld
wt = KcsWeldTable.WeldTable()
wj = wt.GetWeldedJoint( 1)
wld = wj.GetWeld( 1)
wld.SetWeldComment("weld comment")
wj.SetWeld( wld)
wt.SetWeldedJoint( 1, wj)
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Marine Vitesse User Guide
12 Series
Chapter: Python Classes
Hull
Class KcsBodyPlanViewOptions.BodyPlanViewOptions
The class holds information about Body plan View attributes.
Parameters and attributes:
BodyPlanName
string
Defines view name
bAutoSeams
integer
Auto Seams flag. If set, include all seams
(longitudinal direction) and butts (transversal
direction) inside the box.
bAutoLongTrace
integer
Auto longitudinal trace flag. If set, include traces
of all profiles inside the box.
bAutoLongSection
integer
Auto longitudinal section flag. If set, include
cross-sections of all profiles inside the box
SurfacesFilter
[ string ]
List of surface for filtering (include/exclude
depends on SurfacesExclude flag)
SurfacesExclude
integer
Surfaces exclude/include flag
Scale
integer
Defines view scale
AftLimits
Point3d
Defines coordinate of aft limit of the view
FwdLimits
Point3d
Defines coordinate of fwd limit of the view
bLooking
constant
Defines looking code. Can be one of:
LOOKING_PS
= 1
LOOKING_SB
= 2
LOOKING_FOR = 4
LOOKING_AFT = 3
LOOKING_TOP = 5
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 54 of 69
LOOKING_BOT = 6
LongSectionImage
constant
Defines how cross-sections of profiles should be
drawn. Can be one of:
IMAGE_FULL
= 0
IMAGE_MOULD
= 1
IMAGE_THICK
= 2
LongSectionFrame
integer
This attribute can be used to display the crosssection of the profiles at a single frame only.
DrawFrame
integer
Interval (number of frames) between sections to
be drawn in the body plan view.
SeamColour
colour
Defines seam colour
LongColour
colour
Defines longitudinal colour
FrameColour
colour
Defines frame colour
GridSpacing
integer
Defines grid spacing, if it should be drawn.
PanelFilter
[ string ]
Include/Exclude list
SeamsFilter
[ string ]
Include/Exclude list (depends on SeamsExclude
flag)
SeamsExclude
integer
Except flag
TraceFilter
[ string ]
List of names of shell profiles whose traces will
be included/excluded (depends on TraceExclude
flag).
TraceExclude
integer
Except flag
SectionFilter
[ string ]
List of names of shell profiles whose sections will
be included/excluded (depends on
SectionExclude flag).
SectionExclude
integer
Except flag
SelectCurves
dictionary
Curve Name/LineType dictionary (name : line
type). Line type must be defined in system.
Constructor:
BodyPlanViewOptions
()
This constructor will create instance of BodyPlanViewOptions ()
class.
Methods:
SetSection (image, frame)
Sets longitudinal section image and frame.
image
constant
Longitudinal section image type (IMAGE_THICK,
IMAGE_MOULD or IMAGE_FULL)
frame
integer
Longitudinal section frame
(constant,
integer)
Gets section image and frame (image, frame)
GetSection ()
SetColours (long, seam, frame)
Sets longitudinal, seam and frame colours.
Available colour strings are defined in
KcsBodyPlanViewOptions.COLOURS table.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 55 of 69
long
colour
Longitudinal colour
seam
colour
Seam colour
frame
colour
Frame colour
(Colour,
Colour,
Colour)
Gets longitudinal, seam and frame colours (long,
seam, frame)
GetColours ()
Class protocols:
__repr__
Used to return string representation of BodyPlanViewOptions()
object.
Class KcsCopyPanOptions
The class holds information about Copy Panel Options : Inherits from
KcsMovePanOptions
Parameters and attributes:
__Dictionary
Dictionary
Panel Names Dictionary
__BlockName
string
Block Name
Sets Dictionary used to
change Panel Names.
It defines names of panels to copy
and names after copy operation.
Methods:
SetNameMapping
(Dictionary)
Example call of Method:
SetNameMapping({'oldPanel' :
'newPanel'})
Where:
•
OldPanel – is name of
copied panel
•
SetBlockName (string)
Sets Block for copied
Panel
NewPanel – is name of panel
created by copy function.
It defines name of block where
panel will be copied.
Class KcsMovePanOptions
The class holds information about Move Panel Options
Parameters and attributes:
__LocationType
Constant
Type of Location. Can be one of:
PRINCIPAL_PLANE =1
THREE_POINTS
=2
PLANE_OBJECT
=3
__Coordinate
Constant
Defines Coordinate. Can be one of:
X =1
Y =2
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 56 of 69
Z =3
__RelativePosition
Constant
Defines Relative Position. Can be one of:
1 – Relative
0 – Not Relative
__CoordinateValue
string
Coordinate Value in String format
__Origin
Point3D
If defined by three points, Point of Origin
__Uaxis
Point3D
If defined by three points, Point of Uaxis
__Vaxis
Point3D
If defined by three points, Point of VAxis
__ObjectName
string
If Defined by Object, object name
Methods:
SetPrincipalPlane (integer,
integer, string)
Sets Principal Plane by giving cord, relpos, cordval.
Example call:
SetPrincipalPlane(coordinate,
relativePosition, coordinateValue)
Where:
coordinate – is coordinate definition, which
defines plane of moving operation. See parameters
and attributes definition.
relativePosition – is flag which defines if
coordinateValue is relative position or absolute.
See parameters and attributes definition.
CoordinateValue – is, regarding to
relativePosition flag, absolute coordinate value or
relative coordinate value i.e. ‘1000’ or ‘FR1’ .
SetThreePoints (Point3D,
Point3D, Point3D)
Sets three points by giving: origin, uaxis, vaxis
Defines moving operation by three points.
SetThreePoints(Origin, Uaxis, Vaxis)
Where:
Origin, Uaxis, Vaxis – are Point3D definitions
in UVW coordinate system.
SetPlaneObject(string)
Sets Plane Object by giving: name
Set moving operation by plane object where name
is plane object name used to move panel.
Class KcsPanelSchema
The class contains functions operating on panel schema.
Methods:
SetValue
(Group,
Keyword,
Value)
Function to set value of keyword in panel schema
statement.
Parameters:
Group ( Integer/String ) : Index of statement in
group or statement string
Keyword ( String ) : Name of keyword
Value ( String ) : Value of keyword
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
GetValue
(Group,
Keyword )
Page 57 of 69
Function to get value of keyword in panel schema
statement.
Group ( Integer/String ) : Index of statement in
group or statement string
Keyword ( String ) : Name of keyword
Return value: ( String ) Value of keyword in given
statement
Class KcsPanHoleOptions
The class holds information about PanHole Options.
Parameters and attributes:
__Axis
Constant
Defines axis by which hole is created:
BY_UNDEF = 0
BY_U = 1
BY_V = 2
BY_UV = 3
BY_X = 11
BY_Y = 12
BY_Z = 13
BY_YZ = 21
BY_XZ = 22
BY_XY = 23
BY_XYZ = 30
BY_X_Y_ZAP = 36
BY_X_YAP_Z = 34
BY_XAP_Y_Z = 32
BY_XRT = 40
BY_1 = 100
BY_2 = 200
BY_T = 500
____HasApprox
Integer
Defines if approximated coordinate.
0 - true
1- false
__Pt1
Point3D
Defines the origin coordinates.
__Pt2
Point3D
Defines the origin coordinates.
__AsStored
integer
Defines the origin of a hole "as stored".
This is used when the hole is created from
an existing contour which has a
transformation. The contour will be
projected into the curved panel along the
normal of the plane in which the contour is
defined.
1 - true
0 - false
__Rotation
Point3D
In case of an asymmetrical hole, this
defines the direction of the U-axis of the
hole.
__Symm
Constant
Symmetry code.
SYMM_AS_PANEL = 0
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
__IsFictive
Page 58 of 69
integer
SYMM_PS
= 1
SYMM_SB
= 12
Define if hole will be burnt or only marked.
1 - true
0 - false
__Develop
integer
Set the develop option for the hole.
1 – true
0 – false
__IsArbitrary
integer
Set the hole arbitrary, i.e. the hole
designation is a curve.
1 - true
0 - false
__MarkType
Constant
Defines Marking Type
HOLE_MARK = 0
CROSS_MARK = 1
BOTH_MARK = 2
__CrossType
Constant
Defines Cross Type:
OVERHOLE_CROSS = 0
SMALL_CROSS = 1
SPECIAL_CROSS = 2
__MarkLen
Float
Defines Marking Length
Methods:
SetOriginAlongLine (Pt1, Pt2 )
Defines the origin of a hole in a curved
panel, when defined "along line".
The (limited) line is defined by two 3d
points. The origin will be the intersection
point of the line and the panel.
Pt1 (Input). The start point of line
intersecting the curved panel.
Pt2 (Input). The end point of the
intersecting line.
SetOriginAlongAxis(Axis, Pt1, HasApprox)
Defines the origin of a hole in a curved
panel, when defined "along axis".
The (infinite)line is defined by two
coordinates. The origin will be the
intersection point of the line and the
panel. An approximate coordinate must
be given. "Axis" selects which coordinate
if "Pt1" is the approximate one.
Axis (Input). Selects the approximate
coordinate
Pt1 (Input). The coordinates.
SetOriginAsStored(Axis, Pt1)
Defines the origin of a hole "as stored".
This is used when the hole is created from
an existing contour which has a
transformation. The contour will be
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 59 of 69
projected into the curved panel along the
normal of the plane in which the contour is
defined. You may given an approximate
coordinate in case of multiple intersection
with the surface. Approx is:
(axis+coordinate value)
SetDirection(Dir)
In case of an asymmetrical hole, this
selects the direction of the U-axis of the
hole. "Dir" is either a vector or a point.
Interpreted as a vector if the length <= 1.0
If dir is a point the system will form a
vector from origin the point. The vector
will then be projected into the tangent
plane of the panel ( in the origin of the
hole ).
Dir (Input). Point defining the direction
of the U-axis of the hole.
SetArbitrary()
Set the hole arbitrary, i.e. the hole
designation is a curve.
SetFictive()
Set "fictive" form the hole, ( A fictive hole
will not be burnt, only marked.)
SetDevelop()
Set the develop option for the hole.
SetMarkingType(type)
Defines Marking Type
SetCrossType(self, type)
Defines Cross Type
SetMarkLength(self, value)
Defines Marking Length
GetOriginAlongLine(self)
Gets the origin of a hole in a curved
panel, when defined along line
GetOriginAlongAxis(self)
Gets the origin of a hole in a curved
panel, when defined along axis
GetOriginAsStored(self)
Gets the origin of a hole in a curved panel
GetDirection(self)
Gets Direction
GetDesign(self)
Gets Design
IsFictive(self)
Gets Fictive flag
IsDevelop(self)
Gets Develop Flag
IsArbitrary(self)
Gets Arbitrary Flag
GetMarkType(self)
Gets Mark Type
GetCrossType(self)
Gets Cross Type
GetMarkLen(self)
Gets Mark Len
Class KcsRunModeOptions
The class holds information about planar hull scheme run mode options.
Parameters and attributes:
__ConfirmGeneration
Integer
Confirm generation option.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
__TraceOn
Page 60 of 69
Integer
Trace on option
Methods:
SetConfirmGeneration(Integer)
Set Confirm Generation value.
Allowed values: [ 0,1, None ]
GetConfirmGeneration
Get Confirm Generation value.
SetTraceOn (Integer)
Set Trace On value.
Allowed values: [ 0,1, None ]
GetTraceOn ()
Get Trace On value.
Class KcsShPlateProp.ShPlateProp
The class holds information about a shell plate.
Parameters and attributes:
__PartsList
String
An explicitly given parts list name.
__GPS_1
String
General Purpose String.
__GPS_2
String
General Purpose String.
__GPS_3
String
General Purpose String.
__GBP_4
String
General Purpose String.
__SurfaceTreatment
String
Surface Treatment.
__Destination
String
Destination.
__Thickness
Float
Material Thickness (inside).
__ThicknessOut
Float
Material Thickness (outside).
__Quality
String
Material Quality Code.
__Posno
Integer
Position Number.
__LaminateIn
Integer
Laminate code for inside of plate.
__LaminateOut
Integer
Laminate code for outside of plate. A
value o 0 means same laminate code as
for inside.
__LongitudinalShrinkage
Float
Longitudinal shrinkage.
__TransversalShrinkage
Float
Transversal shrinkage.
__RawPlate
String
Raw Plate Identification.
Methods:
GetDestination
GetGPS_1
GetGPS_2
GetGPS_3
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 61 of 69
GetGPS_4
GetLaminateIn
GetLaminateOut
GetLongitudinalShrinkage
GetPartsList
GetPosno
GetQuality
GetRawPlate
GetSurfaceTreatment
GetThickness
GetThicknessOut
GetTransversalShrinkage
SetDestination
SetGPS_1
SetGPS_2
SetGPS_3
SetGPS_4
SetLaminateIn
SetLaminateOut
SetLongitudinalShrinkage
SetPartsList
SetPosno
SetQuality
SetRawPlate
SetSurfaceTreatment
SetThickness
SetThicknessOut
SetTransversalShrinkage
ClassKcsShStiffProp.ShStiffProp
The class holds information about a shell stiffener.
Parameters and attributes:
_DummyInterval
Integer
= 1 The shell stiffener is a dummy
interval.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 62 of 69
_GPS_1
String
General purpose string.
_GPS_2
String
General purpose string.
_GPS_3
String
General purpose string.
_GPS_4
String
General purpose string.
_SurfaceTreatment
String
Surface treatment.
_Destination
String
Destination.
_UseStiffenerData
Integer
= 1 Use the profile data in this
class.
= 0 Use the profile data in the shell
profile this stiffener belongs to.
_Posno
Integer
Position number.
_PosnoPrefix
String
Position number prefix.
_PosnoSuffix
String
Position number prefix.
_Profile
_Type
Profile type according to standards.
_Parameters
Profile parameters.
_Quality
_End[0,1]
String
Material quality code.
_Connection
Connection code.
_Excess
Excess.
_Offset
The given length from the starting /
ending point of the trace to the actual
starting / ending point of the physical
profile, measured as described
below. This length should always be
>=0.
_OffsetFrom
The physical end point of the shell
stiffener will be located at a distance
_Offset from the plane described by
_OffsetFrom, measured
perpendicularly to the plane.
Can be of type:
kcsCUTTING_PLANE
kcsFRAME_PLANE
kcsBUTTOCK_PLANE
kcsWATERLINE_PLANE
_EndCut
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 63 of 69
•
_CalcWebAngle
The angle is calculated according to
the values of _Connection.
•
_CalcFrom
kcsCUTTING_PLANE
kcsFRAME_PLANE
kcsBUTTOCK_PLANE
kcsWATERLINE_PLANE
•
_Type
End cut type.
•
_Parameters
End cut parameters
_WebBevel
Bevel Code for profile web.
_FlaBevel
Bevel code for profile flange.
_InclAngle
Angle measure.
_InclAngelType
Angel type:
kcsX_AXIS,KcsY_AXIS,kcsZAXIs,
kcsPERPENDIUCULAR,
kcsPERP_WHOLe,
kcsCUTTING_PLANE
_TraceBevel
Float
Bevel code along the trace of this
stiffener.
_Shrinkage
Float
Shrinkage of the stiffener in millimeters
per meter.
_FilletWeldDepth
Float
Depth of fillet weld when stiffener is
mounted on a curved panel.
_Perpendicular
Integer
= 1 The stiffener is perpendicular
to the surface at all positions along
the trace.
= 0 Inclination is specified at both
ends.
Methods:
GetDestination
GetDummyInterval
GetEnd1,GetEnd2
Get Connection
GetEndCut
GetCalcFrom
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 64 of 69
GetCalcWebAngle
GetParameter
GetType
SetCalcFrom
SetCalcWebAngle
SetParameter
SetTyp
GetExcess
GetFlaBevel
GetInclAngle
GetInclAngleType
GetOffset
GetOffsetFrom
GetWebBevel
SetConnection
SetExcess
SetFlaBevel
SetInclAngle
SetInclAngleType
SetOffset
SetOffsetFrom
SetWebBevel
GetFilletWeldDepth
GetGPS_1
GetGPS_2
GetGPS_3
GetGPS_4
GetPerpendicular
GetPosno
GetPosnoPrefix
GetPosnoSuffix
GetProfileParameter
GetProfileType
GetQuality
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 65 of 69
GetSurfaceTreatment
GetTraceBevel
GetUseStiffenerData
SetDestination
SetDummyInterval
SetFilletWeldDepth
SetGPS_1
SetGPS_2
SetGPS_3
SetGPS_4
SetPerpendicular
SetPosno
SetPosnoPrefix
SetPosnoSuffix
SetProfileParameter
SetProfileType
SetQuality
SetShrinkage
SetSurfaceTreatment
SetTraceBevel
SetUseStiffenerData
Class KcsShellXViewOptions
The class holds information about Shell Expansion View Options.
Parameters and attributes:
__ShellXName
string
Defines View Name
__DevelopedFromCode
Constant
Defines Coordinate. Can be one
of:
X = 1
Y = 2
Z = 3
__DevelopedFromCoordinate
Point3D
Defines Developed From
Coordinate
__SternLimtsCode
string
Defines Limits Code. Can be one
of:
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 66 of 69
PLANE_BY_SEAMS = 1
PLANE_BY_X
= -1
PLANE_BY_Y
= -2
PLANE_BY_Z
= -3
__SternLimitsSeams
[]
If defined by Seams, list of seams.
__SternLimitsCoordinate
Point3D
Defines Limits Coordinate.
__StemLimitsCode
Point3D
Defines Limits Code. Can be one
of:
PLANE_BY_SEAMS = 1
PLANE_BY_X
= -1
PLANE_BY_Y
= -2
PLANE_BY_Z
= -3
__StemLimitsSeams
[]
If defined by Seams, list of seams.
__StemLimitsCoordinate
Point3D
Defines Limits Coordinate.
__UpperLimitsCode
Constant
Defines Limits Code. Can be one
of:
PLANE_BY_SEAMS = 1
PLANE_BY_X
= -1
PLANE_BY_Y
= -2
PLANE_BY_Z
= -3
__UpperLimitsSeams
[]
If defined by Seams, list of seams.
__UpperLimitsCoordinate
Point3D
Defines Limits Coordinate.
__LowerLimitsCode
Constant
Defines Limits Code. Can be one
of:
PLANE_BY_SEAMS = 1
PLANE_BY_X
= -1
PLANE_BY_Y
= -2
PLANE_BY_Z
= -3
__LowerLimitsSeams
[]
If defined by Seams, list of seams.
__LowerLimitsCoordinate
Point3D
Defines Limits Coordinate.
__SideCode
Constant
Defines Side Code. Can be one
of:
SIDE_PORT
= 0
SIDE_STARBOARD = 1
__bExceptPanels
Integer
Except Flag
__SelectPanels
[]
Include/Exclude List
__bExceptBlocks
Integer
Except Flag
__SelectBlocks
[]
Include/Exclude List
__bExceptSeams
integer
Except Flag
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 67 of 69
__SelectSeams
[]
Include/Exclude List
__bExceptLongitudinals
integer
Except Flag
__SelectLongitudinals
[]
Include/Exclude List
__bExceptTransversals
Integer
Except Flag
__SelectTransversals
[]
Include/Exclude List
__SelectCurves
Dictionary
Select Curves Dictionary
Methods:
SetShelXViewName (string)
Sets View Name
SetDevelopedFromX (Point3D)
Sets plane defined by X
coordinate
SetDevelopedFromY (Point3D)
Sets plane defined by Y
coordinate
SetDevelopedFromZ (Point3D)
Sets plane defined by Z
coordinate
GetShellXViewName
Gets View Name
SetSternLimits
Sets Limits defined by plane X, Y
or Z) or seams and coordinate or
seams list.
GetSternLimits
Gets Stern Limits (code and
coordinate or seam list)
SetStemLimits
Sets Limits defined by plane X, Y
or Z) or seams and coordinate or
seams list.
GetStemLimits
Gets Stem Limits (code and
coordinate or seam list)
SetUpperLimits
Sets Limits defined by plane X, Y
or Z) or seams and coordinate or
seams list.
GetUpperLimits
Gets Upper Limits (code and
coordinate or seam list)
SetLowerLimits
Sets Limits defined by plane X, Y
or Z) or seams and coordinate or
seams list.
GetLowerLimits
Gets Lower Limits (code and
coordinate or seam list)
SetSideCode
Sets Side Code.
GetSideCode
Gets Side Code.
SetSelectPanels
Sets select panels list.
GetPanels
Gets select panels list
SetExceptPanels
Sets except panels flag
SetSelectBlocks
Sets select blocks list.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 68 of 69
GetBlocks
Gets select blocks list
SetExceptBlocks
Sets except blocks flag
SetSelectLongitudinals
Sets select longitudinals list.
GetLongs
Gets select longitudinals list
SetExceptLongitudinals
Sets except longitudinals flag
SetSelectTransversals
Sets select transversals list.
GetTrans
Gets select transversals list
SetExceptTransversals
Sets except transversals flag
SetLineTypes
Sets dictionary with curves names
and types (name : type)
GetCurves
Gets dictionary with curves names
and types.
Class KcsSplitPanOptions.SplitPanOptions
The class holds information about Split Panel Options
Parameters and attributes:
Plane3D
Plane3D
Cutting Plane used to split panel
PanelMapping
[…]
List of items defining new panels after
split operation. Each item is an dictionary
containing following keys:
‘Name’ - panel name
‘Block’ – block name
‘SymmetryCode’ – symmetry code
string
Constructor:
SplitPanOptions()
This constructor will create an instance of SplitPanOptions
class
Methods:
AddPanelMapping
(PanelName, Block, Symmetry)
Define panel name, block and symmetry
code for new panels generated by split
operation. The function should be called
once for each new panel.
PanelName
String
New panel name
Block
<String>
Panel block. If not defined panel block is
remained.
Symmetry
<String>
Panel symmetry code. Possible values:
‘S’, ‘P’, ‘SP’, ‘SBPS’. Default value is
‘SBPS’.
Class protocols:
__repr__
Used to return string representation of SplitPanOptions object.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Python Classes
Page 69 of 69
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
file:///C:/Users/karagisia/AppData/Local/Temp/~hh846D.htm
14.11.2023
Download