SGcableclip([BDW])
BDW : | Nail length, Diameter of cable, wall thickness; default is [3 5 2] |
SGcableclip([03 5 3])
SGcableclip([05 5 3])
SGcableclip([10 5 3])
This function, SGcableclip, is designed to create a cable clip that can be fixed at a 90-degree angle using a nail. It is part of the SolidGeometry library and was introduced in version 5.3. The function takes an optional input parameter, BDW, which is a vector containing three values: the nail length, the diameter of the cable, and the wall thickness. The default values for BDW are [3, 5, 2].
getfuncparams
, with default values [3, 5, 2].a
with side length B using PLsquare
.b
with diameter D using PLcircle
.a
and b
using CPLunion
with 'ontop' and 'right' alignment.b
relative to a
using CPLtransrelCPL
with 'ontop' and 'right' alignment.CPLbuffer
with a buffer distance of 1.2 mm.CPLradialEdges
with 2 edges.f
with dimensions based on the minimum and maximum of D and B, plus an additional buffer of 1.2 mm on each side.f
from the radial-edged profile using CPLsubtract
with 'alignright' and 'alignbottom' alignment.b
from the result.SGofCPLextrude
with a height of 10 mm along the y-axis.P
with diameter D and height 20 mm, rotate it by 90 degrees around the y-axis, and translate it to the origin using SGtrans0
.P
from the extruded shape using SGsubtract
with 'centery' alignment.SGfigure
and SGplotalpha
, and save it as an STL file using SGwriteSTL
after rotating it by 90 degrees around the x-axis.