<commit_before><!doctype html>
<html>
<!--
      Morpheus - A sleek WebGL solid modeling tool for electronic components and circuitboards
      Copyright (c) 2013 CircuitHub.com
-->
<head>
  <meta charset='utf-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
  <title>Morpheus</title>
  <meta name='description' content='A sleek WebGL solid modeling tool for electronic components and circuitboards'>
  <meta name='author' content='<NAME>'>
  <link rel="shortcut icon" href="/favicon.ico">

  <!-- The CSM script -->
  <script id='csm-source-code' type='csm/csm-javascript'>
var grid = latice2("grid",
      {label: "Grid Size", description: "Number of pins per side", components: ["N1 (Columns)", "N2 (Rows)"]},
      [8,8]),
    e = pitch1("e",
      {label: "e", description: "Pitch (lead-to-lead spacing)"},
      0.635),
    pkgDim = tolerance(dimension3("pkgDim",
      {label: "Overall Package", description: "Extent of the package body", components: ["D", "E", "A"]},
      {min: [7.9, 7.9, 2.9], max: [8.1, 8.1, 3.1]})),
    pkgInnerDim = tolerance(dimension2("pkgInnerDim",
      {label: "", description: "Extent of the package body", components: ["D1", "E1"]},
      {min: [5.9, 5.9], max: [6.1, 6.1]})),
    leadDim = tolerance(dimension2("leadDim",
      {label: "Leads", description: "Dimensions of each lead", components: ["b", "L"]},
      {min: [0.17, 0.78], max: [0.27, 1.03]})),
    A1 = dimension1("A1",
      {label: "A1", description: "Package offset from the bottom of the leads"},
      0.05),
    /*centerLead = boolean("centerLead",
      {label: "Center Lead", description: "Does this package have a center exposed heat-lug/pad?", components: ["D2", "E2"]},
      false),*/
    centerLeadDim = tolerance(dimension2("centerLeadDim",
      {label: "Center Lead", description: "Center lead dimensions", components: ["D2", "E2"]},
      {min: [1.1, 0.7], max: [1.2, 0.8]})),
    r = dimension1("r",
      {label: "r", description: "Corner radius of the center pad (mm). Set to 0 for square corners."},
      0.15);

//* Package
box({ dimensions: [pkgInnerDim.index(0), pkgInnerDim.index(1), pkgDim.index(2).sub(A1)] })
.translate({ offset: [0.0, 0.0, A1.mul(0.5)] })
.chamfer({ radius: pkgDim.index(2).mul(0.025) })
.material({ color: [0.2, 0.2, 0.2] }), // Plastic (charcoal black)
//*/
//* Leads
material({ color: [0.8, 0.8, 0.8] }, // Copper alloy

  /* Simple leads
  // Vertical leads
  box({ dimensions: [leadDim.index(1), leadDim.index(0), A1.mul(2.0)] }) 
  .translate({ offset: [pkgDim.index(1).sub(leadDim.index(1)).mul(0.5), 0.0, pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [1, grid.index(1), 1], interval: [0.5, e, 0.5] })
  .mirror({ axes: [0] }),

  // Horizontal leads
  box({ dimensions: [leadDim.index(0), leadDim.index(1), A1.mul(2.0)] }) 
  .translate({ offset: [0.0, pkgDim.index(0).sub(leadDim.index(1)).mul(0.5), pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [grid.index(0), 1, 1], interval: [e, 0.5, 0.5] })
  .mirror({ axes: [1] }),
  */

  //* Complex leads
  // Vertical leads
  box({ dimensions: [
    pkgDim.index(1).sub(pkgInnerDim.index(1)).mul(0.5),
    leadDim.index(0),
    A1.mul(2.0) ]})
  .bend({ axis: 1, angle: -65, offsetAxis: 0, direction: -1,  //TODO: why does angle need to be negative here?
    offset: pkgDim.index(1).sub(pkgInnerDim.index(1)).mul(0.25).sub(leadDim.index(1))  // (total lead length / 2) - (lead landing length)
  })
  .translate({ offset: [
    pkgDim.index(1).add(pkgInnerDim.index(1)).mul(0.25),
    0.0,
    pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [1, grid.index(1), 1], interval: [0.5, e, 0.5] })
  .mirror({ axes: [0] }),

  // Horizotnal leads
  box({ dimensions: [
    leadDim.index(0),
    pkgDim.index(0).sub(pkgInnerDim.index(0)).mul(0.5),
    A1.mul(2.0) ]})
  .bend({ axis: 0, angle: 65, offsetAxis: 1, direction: -1,
    offset: pkgDim.index(0).sub(pkgInnerDim.index(0)).mul(0.25).sub(leadDim.index(1))  // (total lead length / 2) - (lead landing length)
  })
  .translate({ offset: [
    0.0,
    pkgDim.index(0).add(pkgInnerDim.index(0)).mul(0.25),
    pkgDim.index(2).mul(-0.5).add(A1) ]})
  .repeat({ count: [grid.index(0), 1, 1], interval: [e, 0.5, 0.5] })
  .mirror({ axes: [1] }),
  //*/

  // Center lead
  box({ dimensions: [centerLeadDim.index(0), centerLeadDim.index(1), A1.mul(2.0)] }) 
  .chamfer({ radius: r })<commit_msg>Fix PKG QUAD FLAT PACK dimensions<commit_after><!doctype html>
<html>
<!--
      Morpheus - A sleek WebGL solid modeling tool for electronic components and circuitboards
      Copyright (c) 2013 CircuitHub.com
-->
<head>
  <meta charset='utf-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
  <title>Morpheus</title>
  <meta name='description' content='A sleek WebGL solid modeling tool for electronic components and circuitboards'>
  <meta name='author' content='<NAME>'>
  <link rel="shortcut icon" href="/favicon.ico">

  <!-- The CSM script -->
  <script id='csm-source-code' type='csm/csm-javascript'>
var grid = latice2("grid",
      {label: "Grid Size", description: "Number of pins per side", components: ["N1 (Columns)", "N2 (Rows)"]},
      [8,8]),
    e = pitch1("e",
      {label: "e", description: "Pitch (lead-to-lead spacing)"},
      0.635),
    pkgDim = tolerance(dimension3("pkgDim",
      {label: "Overall Package", description: "Extent of the package body", components: ["D", "E", "A"]},
      {min: [7.9, 7.9, 2.9], max: [8.1, 8.1, 3.1]})),
    pkgInnerDim = tolerance(dimension2("pkgInnerDim",
      {label: "", description: "Extent of the package body", components: ["D1", "E1"]},
      {min: [5.9, 5.9], max: [6.1, 6.1]})),
    leadDim = tolerance(dimension2("leadDim",
      {label: "Leads", description: "Dimensions of each lead", components: ["b", "L"]},
      {min: [0.17, 0.78], max: [0.27, 1.03]})),
    A1 = dimension1("A1",
      {label: "A1", description: "Package offset from the bottom of the leads"},
      0.05),
    /*centerLead = boolean("centerLead",
      {label: "Center Lead", description: "Does this package have a center exposed heat-lug/pad?", components: ["D2", "E2"]},
      false),*/
    centerLeadDim = tolerance(dimension2("centerLeadDim",
      {label: "Center Lead", description: "Center lead dimensions", components: ["D2", "E2"]},
      {min: [1.1, 0.7], max: [1.2, 0.8]})),
    r = dimension1("r",
      {label: "r", description: "Corner radius of the center pad (mm). Set to 0 for square corners."},
      0.15);

//* Package
box({ dimensions: [pkgInnerDim.index(0), pkgInnerDim.index(1), pkgDim.index(2).sub(A1)] })
.translate({ offset: [0.0, 0.0, A1.mul(0.5)] })
.chamfer({ radius: pkgDim.index(2).mul(0.025) })
.material({ color: [0.2, 0.2, 0.2] }), // Plastic (charcoal black)
//*/
//* Leads
material({ color: [0.8, 0.8, 0.8] }, // Copper alloy

  /* Simple leads
  // Vertical leads
  box({ dimensions: [leadDim.index(1), leadDim.index(0), A1.mul(2.0)] }) 
  .translate({ offset: [pkgDim.index(1).sub(leadDim.index(1)).mul(0.5), 0.0, pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [1, grid.index(1), 1], interval: [0.5, e, 0.5] })
  .mirror({ axes: [0] }),

  // Horizontal leads
  box({ dimensions: [leadDim.index(0), leadDim.index(1), A1.mul(2.0)] }) 
  .translate({ offset: [0.0, pkgDim.index(0).sub(leadDim.index(1)).mul(0.5), pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [grid.index(0), 1, 1], interval: [e, 0.5, 0.5] })
  .mirror({ axes: [1] }),
  */

  //* Complex leads
  // Vertical leads
  box({ dimensions: [
    leadDim.index(0),
    pkgDim.index(1).sub(pkgInnerDim.index(1)).mul(0.5),
    A1.mul(2.0) ]})
  .bend({ axis: 0, angle: 65, offsetAxis: 1, direction: -1,
    offset: pkgDim.index(1).sub(pkgInnerDim.index(1)).mul(0.25).sub(leadDim.index(1))  // (total lead length / 2) - (lead landing length)
  })
  .translate({ offset: [
    0.0,
    pkgDim.index(1).add(pkgInnerDim.index(1)).mul(0.25),
    pkgDim.index(2).mul(-0.5).add(A1) ]})
  .repeat({ count: [grid.index(0), 1, 1], interval: [e, 0.5, 0.5] })
  .mirror({ axes: [1] }),
  //*/

  // Horizontal leads
  box({ dimensions: [
    pkgDim.index(0).sub(pkgInnerDim.index(0)).mul(0.5),
    leadDim.index(0),
    A1.mul(2.0) ]})
  .bend({ axis: 1, angle: -65, offsetAxis: 0, direction: -1,  //TODO: why does angle need to be negative here?
    offset: pkgDim.index(0).sub(pkgInnerDim.index(0)).mul(0.25).sub(leadDim.index(1))  // (total lead length / 2) - (lead landing length)
  })
  .translate({ offset: [
    pkgDim.index(0).add(pkgInnerDim.index(0)).mul(0.25),
    0.0,
    pkgDim.index(2).mul(-0.5).add(A1)] })
  .repeat({ count: [1, grid.index(1), 1], interval: [0.5, e, 0.5] })
  .mirror({ axes: [0] }),

  // Center lead
  box({ dimensions: [centerLeadDim.index(0), centerLeadDim.index(1), A1.mul(2.0)] }) 
  .chamfer({ radius: r })
{'fraction_non_alphanumeric': 0.2232061762034514, 'fraction_numerical': 0.0533605812897366, 'mean_word_length': 3.4898063200815495, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3739030', 'n_tokens_mistral': 3591, 'n_tokens_neox': 3364, 'n_words': 789}