Skip to content

Commit

Permalink
Added keepout configuration for the molded body 2-pin
Browse files Browse the repository at this point in the history
  • Loading branch information
callendorph committed Sep 30, 2024
1 parent 08981ba commit 3436dea
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/landpatterns/two-pin/molded.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ public defstruct Molded-2pin <: Package :
that the `anode` pin gets a pin-1 marker.
<DOC>
pin-1-id?:Maybe<Int|Ref>

doc: \<DOC>
Optional Keepout for the Molded Component Body
Typically, the user might use `IntraPadKeepOut` here.
Default is `None()`
<DOC>
keep-out:Maybe<KeepoutCreator> with:
default => None()

doc: \<DOC>
Package Body
Typically a rectangular {@link PackageBody} but other
Expand Down Expand Up @@ -86,12 +95,13 @@ public defn Molded-2pin (
package-body:PackageBody,
polarized?:True|False = false,
pin-1-id?:Maybe<Ref|Int> = default-molded-pin-1-id(polarized?),
keep-out:Maybe<KeepoutCreator> = None(),
pad-planner:PadPlanner = RectanglePadPlanner
lead-numbering:Numbering = select-numbering(polarized?)
density-level:DensityLevel = DENSITY-LEVEL
) -> Molded-2pin :
#Molded-2pin(
lead-span, lead, polarized?, pin-1-id?,
lead-span, lead, polarized?, pin-1-id?, keep-out,
package-body, pad-planner, lead-numbering
density-level
)
Expand Down Expand Up @@ -160,3 +170,12 @@ public defmethod build-silkscreen (
add-pin-1-dot(vp, marker-pt)

add-reference-designator(vp)

public defmethod build-keep-out (
pkg:Molded-2pin,
vp:VirtualLP
):
match(keep-out(pkg)):
(_:None): false
(given:One<KeepoutCreator>):
build-keep-out(value(given), vp)

0 comments on commit 3436dea

Please sign in to comment.