The S3D.model namespace provides functions which take action on the s3d_model object.


To create a model object, see s3d_model.


Setting a model is the first step to running any analysis, design or running any other functionality on a structural model.

s3d_modelobjectA s3d_model objectAn object containing information that represents a Structural 3D model.
Sample input for S3D.model.set
"function": "S3D.model.set",
"arguments": {
"s3d_model": MODEL_OBJECT

The response will confirm whether or not the model was successfully set.

Sample response for S3D.model.set
"msg": "Model was successfully set.",
"status": 0,
"data": ""
Try S3D.model.set


Once the model is set, you can request the model data at any time by calling the function S3D.model.get. This function takes no arguments, and will return the s3d_model object.


S3D.model.get will only work if S3D.model.set has been called earlier in the session.

Sample input for S3D.model.get
"function": "S3D.model.get"

The response will return the s3d_model object.

Sample response for S3D.model.get
"status": 0,
"function": "S3D.model.get",
"msg": ""


S3D.model.repair will run SkyCiv's repair model functionality. This will identify any issues with the model and repair them to help ensure the analysis model is built correctly.


s3d_model may be omitted if S3D.model.set has been called earlier in the session.

s3d_modelobjectA s3d_model objectAn object containing information that represents a Structural 3D model.
An array of strings defining the checks to be performed.all


  • unused_nodes - scan model for nodes that are floating and disconnected.
  • large_structure - detect extremely slender members (used to detect unit issues).
  • merge_nodes - merge close nodes with a tolerance based on unit system.
  • zero_members - detect members that have the same start/end node.
  • continuous_to_normal_members - detect members with intermediate nodes. Change to continuous.
  • intersect_members - detect and connect intersecting members.
  • default_section - find any members with no section data, add a default section.
  • force_plate_mesh - allow analysis to run without plates being meshed first.
Sample input for S3D.model.repair
"function": "S3D.model.repair",
"arguments": {
"s3d_model": MODEL_OBJECT,
"checks": [

The response will confirm whether or not the model was successfully repaired.

Sample response for S3D.model.repair
"msg": "S3D model successfully repaired",
"status": 0


Runs a structural analysis on your s3d_model.

analysis_typestringlinear, nonlinear, buckling, dynamic, response_spectrumThe type of analysis to be performed.linear
repair_modelbooleantrue, falseIf S3D.model.repair should be executed prior to solving.false
return_resultsbooleantrue, falseTo minimize data downloaded, solve data will be removed.true
formatstringjson, csvExport results in particular file format.json
lc_filter[string]envelope, load_case, load_group, load_combo, envelope_abs_maxOnly return specific data in the response. You can also provide names you have applied to load combination. E.g. LC1.All cases
result_filter[string]reactions, member_displacements, member_forces, member_stresses, member_lengths, member_stations, member_discontinuities, member_minimums, member_maximums, member_peak_results, plate_displacements, plate_forces, plate_stresses, plate_minimums, plate_maximums, plate_peak_results, buckling, dynamic_frequencyOnly return specific data in the response.All results

Using the filter properties will drastically reduce the size of the response therefore saving on download data and time.

Sample input for S3D.model.solve
"function": "S3D.model.solve",
"arguments": {
"analysis_type": "nonlinear",
"repair_model": true,
"lc_filter": ["envelope_abs_max", "LC1"],
"result_filter": ["member_peak_results", "member_discontinuities"]
Try S3D.model.solve

The analysis results will return an object of all the load combination results in the following format. If the solver fails to run, it will return with a status: 1 and an error message to assist in debugging the issue.

Sample response for S3D.model.solve
"1": {
"name": "LC1",
"type": "user_defined",
"reactions": {},
"member_displacements": {},
"member_forces": {},
"member_stresses": {},
"member_lengths": {},
"member_stations": {},
"member_discontinuities": {},
"member_minimums": {},
"member_maximums": {},
"member_peak_results": {},
"plate_displacements": {},
"plate_forces": {},
"plate_stresses": {},
"plate_minimums": {},
"plate_maximums": {},
"plate_peak_results": {}
"2": {} // etc


Once S3D.model.set has been executed, you can take various screenshots of the model.

views[string]iso, front, side, topArray of strings, defining the different perspectives to take a screenshot from.
is_rendererbooleantrue, falseTake screenshots of the structure in the 3D renderer.
visibility_settingsobjectAn object as defined in visibility_settingsAn object defining additional settings. Only applicable to wireframe display.


show_nodesbooleantrue, falseIf nodes should be visible.
show_loadsbooleantrue, falseIf loads should be visible.
show_platesbooleantrue, falseIf plates should be visible.
projectionstringperspective, orthographicThe projection of the model to the view-point.
Sample input for S3D.model.takeScreenshot
"function": "S3D.model.takeScreenshot",
"arguments": {
"views": ["iso", "front", "side", "top"],
"is_renderer": false,
"visibility_settings": {
"show_nodes": true,
"show_loads": false,
"show_plates": true,
"projection": "perspective"
Try S3D.model.takeScreenshot


The response will return an object of screenshots in base64 format.

Sample response for S3D.model.takeScreenshot
"status": 0,
"msg": "Screenshots successfully taken and returned in base64 format.",
"data": {
"iso": "data:image/png;base64,iVBORw0K...",
"front": "data:image/png;base64,EACEpCABCQg....",
"side": "data:image/png;base64,GABCQgAQlIQAI....",
"top": "data:image/png;base64,CABCUhAAhKQgAQ...."

The following is an example of the isometric screenshot from the above sample:


Mesh the plates in the s3d_model object.

methodstringfrontal_quads, frontal, adapt, packing_parallelograms, delaunaySpecify what type of mesher to use.frontal
granularityinteger1-5Integer between 1 and 5 for level of granularity of mesh (1 is coarse, 5 is fine).1
plate_ids[integer]An array of plate ids.Array of plates you wish to mesh.All plates if property is not provided.
Sample input for S3D.model.mesh
"function": "S3D.model.mesh",
"arguments": {
"method": "delaunay",
"granularity": 3,
"plate_ids": [1, 3]


Allows you to run custom JavaScript functions to access all S3D functionality such as intersecting or adding new nodes or members. Available functions can be found here.

scriptstringA string of JavaScriptDefine custom actions to run. Available functions can be found here.
Sample input for S3D.model.script
const custom_script = `
//splits members by intersecting nodes
"typ": "intersectingMembers",
"memberNo": 343
//node already exists here, so will return existing node ID
var new_node_id = S3D.structure.nodes.add({
x: 32,
y: 36,
z: 104
var new_node_id2 = S3D.structure.nodes.add({
x: 32,
y: 0,
z: 0
nodeA: new_node_id,
nodeB: new_node_id2,
section_id: 1,
type: "continuous", //normal, rigid, tension, compression, cable
fixityA: "FFFFFF",
fixityB: "FFFFFF",
offsetsA: "0,0,0",
offsetsB: "0,0,0",
const functions = [
function: 'S3D.session.start',
arguments: {
keep_open: false,
function: 'S3D.model.set',
arguments: {
s3d_model: MODEL_OBJECT,
function: 'S3D.model.script',
arguments: {
script: custom_script,
function: 'S3D.file.save',
arguments: {
name: 'Script Testing',
path: 'api',