Skip to content
Discussion options

You must be logged in to vote

You can define the elevation as vertex, strange - but that is the requirement of the DXF format:

z = 10  # same z-axis for all vertices
msp.add_polyline2d(contour_plgs, format='v', dxfattibs={
     "elevation": (0, 0, z),
})

LWPOLYLINE has a proper elevation attribute:

z = 10  # same z-axis for all vertices
msp.add_lwpolyline(contour_plgs, format='v', dxfattibs={
     "elevation": z,
})

Other solution: translate entity in z-direction:

z = 10  # same z-axis for all vertices
entity = msp.add_polyline2d(contour_plgs, format='v')
entity.translate(0, 0, z)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ilija-lazoroski
Comment options

Answer selected by ilija-lazoroski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants