Skip to content

New 2D Exports #260

Answered by gumyr
Paul8043 asked this question in Q&A
Jun 22, 2023 · 14 comments · 48 replies
Discussion options

You must be logged in to vote

What you're looking for here is a Compound/assembly. This is a collection of objects that aren't fused together - like this:

border_pl.label = "border"
plate_pl.label = "plate"
cut_pl.label = "cut"
drawing = Compound(label="drawing", children=[border_pl, plate_pl, cut_pl])
print(drawing.show_topology())
show_object(drawing, name="drawing")
svg = ExportSVG()
svg.add_shape(drawing, "")
svg.write("example-2-v01.svg")
drawing    Compound at 0x7f02f6ff3c10, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
├── border Polyline at 0x7f0376ad0fd0, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00))
├── plate  Polyline at 0x7f02f700f070, Location(p=(0.00, 0.00, 0.00), o=(-0.00, 0.00, -0.00…

Replies: 14 comments 48 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
12 replies
@Paul8043
Comment options

@jrmobley
Comment options

@jrmobley
Comment options

@Paul8043
Comment options

@Paul8043
Comment options

Comment options

You must be logged in to vote
7 replies
@jrmobley
Comment options

@Paul8043
Comment options

@gumyr
Comment options

@gumyr
Comment options

@Paul8043
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@gumyr
Comment options

Answer selected by Paul8043
@jrmobley
Comment options

@Paul8043
Comment options

@Paul8043
Comment options

@jrmobley
Comment options

Comment options

You must be logged in to vote
2 replies
@Paul8043
Comment options

@Paul8043
Comment options

Comment options

You must be logged in to vote
4 replies
@jrmobley
Comment options

@Paul8043
Comment options

@jrmobley
Comment options

@Paul8043
Comment options

Comment options

You must be logged in to vote
2 replies
@jrmobley
Comment options

@Paul8043
Comment options

Comment options

You must be logged in to vote
6 replies
@gumyr
Comment options

@Paul8043
Comment options

@gumyr
Comment options

@Paul8043
Comment options

@gumyr
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@jrmobley
Comment options

@jrmobley
Comment options

@jdegenstein
Comment options

@jrmobley
Comment options

Comment options

You must be logged in to vote
2 replies
@gumyr
Comment options

@jrmobley
Comment options

Comment options

You must be logged in to vote
1 reply
@jrmobley
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants