SVG Section Dimensions

The SVG Section Drawer has been developed to easily draw cross section dimensions for different geometries in SkyCiv Quick Design.

Supported Sections#

  • Hollow Rectangular
  • Rectangular
  • I-Beam
  • Hollow Circular
  • Circular
  • Channel
  • Double Channel
  • Z Shapes
  • T-Section
  • Angle
  • Hat Shape
  • Hat Shape Angle
  • Lipped Channel
  • Lipped Double Channel
  • Lipped Z

Functions#

drawRectangularTube#

Draws a rectangular tube.

ParameterTypeDescription
colorstringThe color of the tube.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness. Pass false to hide this dimension.
tWInputnumberThe web thickness. Pass false to hide this dimension.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn rectangular tube.

drawRectangle#

Draws a rectangle.

ParameterTypeDescription
colorstringThe color of the rectangle.
bInputnumberThe section width.
dInputnumberThe section height.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn rectangle.

drawIBeam#

Draws an I beam.

ParameterTypeDescription
colorstringThe color of the beam.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn I beam.

drawCircularTube#

Draws a circular tube.

ParameterTypeDescription
colorstringThe color of the tube.
dInputnumberThe section diameter.
tInputnumberThe wall thickness. Pass false to hide this dimension.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn circular tube.

drawCircle#

Draws a circle.

ParameterTypeDescription
colorstringThe color of the tube.
dInputnumberThe section diameter.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn circular tube.

drawChannel#

Draws a channel.

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn channel.

drawDoubleChannel#

Draws a double channel.

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
separationnumberThe separation thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn double channel.

drawZ#

Draws a z shape

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tInputnumberThe thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn z shape.

drawTSection#

Draws a T Section.

ParameterTypeDescription
colorstringThe color of the t section.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
flipbooltrue flips the section.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn T Section.

drawAngle#

Draws a angle Section.

ParameterTypeDescription
colorstringThe color of the angle section.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
flipbooltrue flips the section.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn Angle Section.

drawHatSection#

Draws a hat section.

ParameterTypeDescription
colorstringThe color of the hat section.
b1InputstringThe top flange width.
b2InputstringThe bottom flange width.
dInputstringThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
flipbooltrue flips the section.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn Hat Section.

drawHatAngleSection#

Draws a hat section angle.

ParameterTypeDescription
colorstringThe color of the hat section.
b1InputstringThe top flange width.
b2InputstringThe bottom flange width.
dInputstringThe section height.
tInputnumberThe section thickness.
lInputnumberThe lip thickness.
lAInputnumberThe lip angle.
hAInputnumberThe hat angle.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn Hat Section.

drawLippedChannel#

Draws a lipped channel.

Draws a channel.

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tInputnumberThe flange and web thickness.
lInputnumberThe lip thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn lipped channel.

drawLippedDoubleChannel#

Draws a lipped double channel.

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tFInputnumberThe flange thickness.
tWInputnumberThe web thickness.
lInputnumberThe lip thickness.
separationnumberThe separation thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn z shape.

drawLippedZ#

Draws a z shape.

ParameterTypeDescription
colorstringThe color of the channel.
bInputnumberThe section width.
dInputnumberThe section height.
tInputnumberThe thickness.
lInputnumberThe lip thickness.
widthnumberThe width of the drawing area.
heightnumberThe height of the drawing area.
unitsstringThe unit string for the dimensions.
axisbool or objectfalse is default for no axis, otherwise an Axis Object.
rotation_anticlockwisebooltrue rotates sections 90 degrees anticlockwise.
principal_axisbool or objectfalse is default for no axis, otherwise an Axis Object.

Returns: string - The SVG HTML representing the drawn z shape.

Axis Object#

The axis object can contain the following key-value pairs. The object can be set to false to exclude the axis. An empty {} object can be used to include the default axis.

PropertyDefault ValueDescription
vertical_label'Z'The label for the vertical axis.
horizontal_label'Y'The label for the horizontal axis.
vertical_color'blue'The color for the vertical axis.
horizontal_color'green'The color for the horizontal axis.
vertical_axis_label_color'blue'The label color for the vertical axis.
horizontal_axis_label_color'green'The label color for the horizontal axis.
axis_size'small'The size of the axis. "small", "medium", "large".
out_of_plane_label'X'The label for the out of plane axis.
out_of_plane_label_color'red'The label color for the out of plane axis.
out_of_plane_color'red'The color for the out of plane axis.
out_of_plane_dir'cross'The direction of the axis. "in", "out", "cross".
show_out_of_plane_axisfalseIndicates if the out of plane axis should be shown.

Example Code#

In the ui.js file:

var section_drawer = SectionDrawer();
svg_html = section_drawer.drawRectangularTube(
'black',
100,
200,
10,
12,
300,
150,
'mm',
false
);
div_input = jQuery('#div_input')
div_input.html(svg_html)

In the calculate.js file:

let sectionDrawer = SectionDrawer;
svg_html = sectionDrawer.drawRectangularTube(
'black',
100,
200,
10,
12,
300,
150,
'mm',
false,
false
);
ReportHelpers.print("", svg_html, "");

In the ui.js with axis object:

var axis = false;
if (input.show_axis) {
axis = {
vertical_label: input.vertical_axis_label,
horizontal_label: input.horizontal_axis_label,
vertical_color: input.vertical_axis_color,
horizontal_color: input.horizontal_axis_color,
}
}
var section_drawer = SectionDrawer();
svg_html = section_drawer.drawRectangularTube(
'black',
100,
200,
10,
12,
300,
150,
'mm',
axis,
false
);
div_input = jQuery('#div_input')
div_input.html(svg_html)

Sample Calculator#

You can find a sample calculator to view all the options for SVG Section Dimensions here.