• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Turning enclosed lines into a shape?

Stats

  • Replies 15
  • Subscribers 162
  • Views 19837
  • Members are here 0
More Content

Turning enclosed lines into a shape?

EvanShultz
EvanShultz over 16 years ago

 Is there an existing way (I will assume using SKILL) to turn an area enclosed by lines into a shape on any given layer? In my specific application, I am bringing in a DXF drawing and I'd like to take the areas in the DXF file and make them shapes.

  • Sign in to reply
  • Cancel
  • jtra
    jtra over 8 years ago
    Yes. Idea I had is to leverage data on Assembly layer and convert that to DFA shape. This is because some footprints are missing the DFA layer. Thanks!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago
    This function should help you:

    defun( DE_ConvertLineToShape (lineDBID, shapeLayer)
    when(lineDBID ->objType == "path" && onep(lineDBID ->nSegs) && lineDBID ->hasArcs || lineDBID ->nSegs > 2 && axlGeoPointsEqual(car(car(lineDBID ->segments) ->startEnd), cadr(lastelem(lineDBID ->segments) ->startEnd))
    path = axlDB2Path(lineDBID)
    poly = car(axlPolyFromDB(path))
    axlDBCreateShape(poly, t, shapeLayer)
    )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jtra
    jtra over 8 years ago
    That worked great! I just edited a bit to fit our scheme. Thanks so much!

    procedure( DE_ConvertLineToShape()
    let((lineDBID, shapeLayer, poly, path)
    axlSetFindFilter( ?enabled '( "noall" "lines") ?onButtons '( "noall" "lines" ))
    lineDBID = axlGetSelSet(axlSingleSelectBox())
    shapeLayer = "PACKAGE GEOMETRY/DFA_BOUND_TOP"
    when(lineDBID
    foreach(item lineDBID
    item ->objType == "path" && onep(item ->nSegs) && item ->hasArcs || item ->nSegs > 2 && axlGeoPointsEqual(car(car(item ->segments) ->startEnd), cadr(lastelem(item ->segments) ->startEnd))
    path = axlDB2Path(item)
    poly = car(axlPolyFromDB(path))
    axlDBCreateShape(poly, t, shapeLayer)
    );foreach
    ); when
    );let
    );proc
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • cykoay
    cykoay over 8 years ago
    hi Dave,
    I tried to select all non-closed line for on board logo using your clineToShape_public.il but seems like it is not successful with error message"no cline/line(without arc segments) here, is it this script cannot support non-closed intersected line shape?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 8 years ago

    That utility is intended for converting clines (with a width) into shapes.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information