Example
- Last UpdatedJan 07, 2026
- 2 minute read
Example on using the plane panel modelling interface. All error handling has been left out to keep the example small. A slash (\) at the end of lines mean that the statement continues on the next line.
|
Example: |
|---|
|
import kcs_ui import kcs_util import kcs_hullpan import kcs_draft from KcsModel import Model from KcsPoint2D import Point2D upperDeck = Model() lowerDeck = Model() resp, position = kcs_ui.req_int('Side web position') resp, point = kcs_ui.point2D_req('Indicate upper deck', Point2D()) if resp == kcs_util.ok(): kcs_draft.model_identify(point, upperDeck ) resp, point = kcs_ui.point2D_req('Indicate lower deck', Point2D()) if resp == kcs_util.ok(): kcs_draft.model_identify(point, lowerDeck ) kcs_hullpan.pan_init( panelName, ident) stmt = "PAN, '" + panelName + "', SBP, DT=123, X=FR"+str(position) + ";" kcs_hullpan.stmt_exec( 0, stmt) stmt = "POI, NO=1, INT, " + upperDeck.Name + \ "',SID=BOT, M1=-" + str(depth) + "/ '" + hcx +str(position) + "';" kcs_hullpan.stmt_exec( 0, stmt) stmt = "POI, NO=2, INT, " + lowerDeck.Name + \ "', SID=TOP, M1=-" + str(depth) + "/ '" + hcx + str(position) + "';" kcs_hullpan.stmt_exec( 0, stmt) stmt = "BOU, '" + hcx + str(position) + "'/ '"+ upperDeck.Name + \ "'/ XYZ=P1, XTY=P2/ '" +lowerDeck.Name +"';" kcs_hullpan.stmt_exec( 0, stmt) kcs_hullpan.pan_store() kcs_hullpan.pan_skip() |
-
Get the position of the sideweb.
-
Indicate the upper deck.
-
Initiate a new panel. A scheme is created and the editor started.
-
Create a panel statement containing a name generated (automatically) elsewhere and the given position.
-
Add the panel statement to the scheme and execute it.
-
Create a topological point statement to be used to define the boundary.
-
Create the boundary statement from a hullcurve derived from the position, the two indicated decks and the topological points.
-
Store the panel.
-
Terminate the scheme.
The rest of the components such as seams, plates, notches, brackets, flanges and/or stiffeners are added in the same way as the topological points and the boundary. The topological point is very useful in Vitesse program in order to reuse input that is combined into new geometry by referring the surrounding model items.