Set the parameters for the solder mask.

syntaxSyntax:
DlxPadStyle.SetSolderMask(topMode = DlxApp.SOLDERMASK_STANDARD, topExp = 0.1, botMode = -1, botExp = 0)

Parameters

Parameter Description
topMode Set the mode for the top layer of the PCB. Specify one of the following values:
DlxApp.SOLDERMASK_STANDARD Indicates that for this type of pad the aperture value in the solder mask is adjusted by the value set in the Project.
DlxApp.SOLDERMASK_FREE The value of the opening in the solder mask corresponds to the shape of the expanded pad according to the value specified for the parameter topExp.
DlxApp.SOLDERMASK_FREEHOLE The value of the opening in the solder mask corresponds to the shape of the expanded hole according to the value specified for the parameter topExp.
DlxApp.SOLDERMASK_COVERED Indicates that this type of pad does not have an opening in the solder mask. The pad is completely covered with the solder resist.
DlxApp.SOLDERMASK_FILLED This indicates that for this type of pad the hole must be completely filled (Via Fill). This is done by covering the pad and the hole with a second layer of solder resist. To display the mask for Via Fill you need to set the relevant option in the properties of the layer (top or bottom solder resist) in the view.
topExp Specify how much the shape of the pad or hole should be expanded to create the opening in the solder mask. Typically the shape for the solder mask is larger than that of the pad.
botMode Set the mode for the bottom layer of the PCB. Specify one of the following values or -1 to use the same parameters as the top layer:
DlxApp.SOLDERMASK_STANDARD Indicates that for this type of pad the aperture value in the solder mask is adjusted by the value set in the Project.
DlxApp.SOLDERMASK_FREE The value of the opening in the solder mask corresponds to the shape of the expanded pad according to the value specified for the parameter topExp.
DlxApp.SOLDERMASK_FREEHOLE The value of the opening in the solder mask corresponds to the shape of the expanded hole according to the value specified for the parameter topExp.
DlxApp.SOLDERMASK_COVERED Indicates that this type of pad does not have an opening in the solder mask. The pad is completely covered with the solder resist.
DlxApp.SOLDERMASK_FILLED This indicates that for this type of pad the hole must be completely filled (Via Fill). This is done by covering the pad and the hole with a second layer of solder resist. To display the mask for Via Fill you need to set the relevant option in the properties of the layer (top or bottom solder resist) in the view.
botExp Specify how much the shape of the pad or hole should be expanded to create the opening in the solder mask. Typically the shape for the solder mask is larger than that of the pad. This value is not used if botMode is -1.

Return Value

If the operation ends correctly, it returns true otherwise it returns false.

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example PCB");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example PCB");
var doc = prj.GetDocument("Examples PCB", DlxApp.DOCTYPE_PCB);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Pcb", DlxApp.DOCTYPE_PCB);
  doc.SetPageFormat("A4", false);
  var page = doc.NewPage("PCB", 0, true);
  page.LoadLayerStack("2 layer pcb stackup.clxlys");
  page.DrawBoard(new DlxRect(10, 10, 290, 200));
  page.SelectView("Draw Copper From Top");
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.FindPage("PCB");
  if (page.IsValid() && doc.SelectPage(page))
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_TOPCOPPER);
    if (layer.IsValid())
    {  
      var padstyle = new DlxPadStyle();
      padstyle.SetShape(DlxApp.LAYERTYPE_ALLPCBLAYERS, DlxApp.PADSHAPE_ROUNDED, 1.5, 2.0, 0.5);
      padstyle.SetHole(0.5, true, -0.45, -0.25, 1, 30);
      padstyle.SetSolderMask(DlxApp.SOLDERMASK_FREE, 0.2);
      layer.DrawPad(new DlxPoint(100,150), padstyle, "1");
    }
  }
}

See also