Jump to content

Problem with using Create Compound


Recommended Posts

I am trying to prepare a file to be used on a laser cutter.  I am trying to simplify the paths by creating a specific colour on my design for each task for eg. Cut, Engrave, Score.

The first pic is my design before attempting this.  I then ungrouped all, selected same colour, black.  I then went to Layer-Create compound.  All of the elements in black disappeared as shown in second pic.  Help, please!  Either to solve why it disappeared or to recommend another route for simplifying this file for selling as an svg for laser machines.  Thanks so much!

 

Screenshot (46).png

Screenshot (47).png

Link to comment
Share on other sites

Welcome to the Serif Affinity Forums, @ajuliea. :)

I can’t immediately think of a reason why the procedure you described didn’t work, but since all those little black circles are non-overlapping you could do a simple ‘Add’ instead of a compound ‘Add’ for a non-destructive (i.e. readily reversible) result.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Link to comment
Share on other sites

 

Can you group all of the black circles once selected? If you can put them all in one group, then you could merge them into one layer (layer>geometry>merge). 

 

How did you draw the little circles? If I draw tiny circles with the pencil tool for instance, then add them they disappear. For some reason that is normal if you try to add strokes. If I make ellipses and add them then it works. 

Link to comment
Share on other sites

I don't see why your black circles have gone but I would be careful about using Add or Merge curves on shapes, certainly ellipses and rectangles
Here I have a simple example of four strokes with an ellipse at the end
If I just export an svg, for the ellipses I get
<ellipse cx="187.353" cy="154.51" rx="19.216" ry="18.431" style="fill:none;stroke:#000;stroke-width:4px;"/>
<ellipse cx="178.725" cy="388.235" rx="19.216" ry="18.431" style="fill:none;stroke:#000;stroke-width:4px;"/>
<ellipse cx="363.039" cy="399.216" rx="19.216" ry="18.431" style="fill:none;stroke:#000;stroke-width:4px;"/>
<ellipse cx="382.255" cy="154.51" rx="19.216" ry="18.431" style="fill:none;stroke:#000;stroke-width:4px;"/>

I doubt if the laser software is bright enough, pun intended, to handle that as it probably wants a path for each object
If you convert the ellipses to curves the output is the same, not one of Affinity's finest achievements

If you Add or Merge curves you'll get
<path d="M363.039,380.784C373.645,380.784 382.255,389.043 382.255,399.216C382.255,409.388 373.645,417.647 363.039,417.647C352.434,417.647 343.824,409.388 343.824,399.216C343.824,389.043 352.434,380.784 363.039,380.784ZM178.725,369.804C189.331,369.804 197.941,378.063 197.941,388.235C197.941,398.408 189.331,406.667 178.725,406.667C168.12,406.667 159.51,398.408 159.51,388.235C159.51,378.063 168.12,369.804 178.725,369.804ZM187.353,136.078C197.958,136.078 206.569,144.337 206.569,154.51C206.569,164.682 197.958,172.941 187.353,172.941C176.748,172.941 168.137,164.682 168.137,154.51C168.137,144.337 176.748,136.078 187.353,136.078ZM382.255,136.078C392.86,136.078 401.471,144.337 401.471,154.51C401.471,164.682 392.86,172.941 382.255,172.941C371.649,172.941 363.039,164.682 363.039,154.51C363.039,144.337 371.649,136.078 382.255,136.078Z" style="fill:none;stroke:#000;stroke-width:4px;"/>
which contains the four paths, each one ends with a Z. Is the laser software capable of turning off the laser at each Z then back on when it has moved or does it not matter if it's quick enough?

I think you need four individual paths for this and Affinity can't produce these if you're using ellipses
However, if you open your svg in Inkscape, select the lot and do Path/Object to path then the output will be
<path d="M363.039,380.784C373.645,380.784 382.255,389.043 382.255,399.216C382.255,409.388 373.645,417.647 363.039,417.647C352.434,417.647 343.824,409.388 343.824,399.216C343.824,389.043 352.434,380.784 363.039,380.784Z" style="fill:none;stroke:#000;stroke-width:4px;"/>
<path d="M178.725,369.804C189.331,369.804 197.941,378.063 197.941,388.235C197.941,398.408 189.331,406.667 178.725,406.667C168.12,406.667 159.51,398.408 159.51,388.235C159.51,378.063 168.12,369.804 178.725,369.804Z" style="fill:none;stroke:#000;stroke-width:4px;"/>
<path d="M187.353,136.078C197.958,136.078 206.569,144.337 206.569,154.51C206.569,164.682 197.958,172.941 187.353,172.941C176.748,172.941 168.137,164.682 168.137,154.51C168.137,144.337 176.748,136.078 187.353,136.078Z" style="fill:none;stroke:#000;stroke-width:4px;"/>
<path d="M382.255,136.078C392.86,136.078 401.471,144.337 401.471,154.51C401.471,164.682 392.86,172.941 382.255,172.941C371.649,172.941 363.039,164.682 363.039,154.51C363.039,144.337 371.649,136.078 382.255,136.078Z" style="fill:none;stroke:#000;stroke-width:4px;"/>
which looks pretty good to me

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

Thanks, David.  Your answer is thorough but too technical for my skills.  I have been trying to export from Affinity to Adobe Illustrator as a pdf.  (I don't have Inkscape but I just purchased Illustrator to learn.)  The file looks good on my screen but when I send it to my daughter who cuts the files for me, it looks like this.  Two photos below.  You can see it looks black in the layers panel.  Not sure what happened in the transfer from Affinity to Illustrator!  Any help is appreciated!

Screenshot (49).png

Messenger_creation_0c8e91f3-6b2b-404b-b1ea-d45691231965.jpeg

Link to comment
Share on other sites

7 hours ago, ajuliea said:

Thanks, David.  Your answer is thorough but too technical for my skills

It may look intimidating at first, but SVGs ultimately just comprise a form of XML markup language. Once you have looked at a few SVGs in a code/text editor, you soon pick up the syntax, and that can be handy to spot and fix problems once you know what to look for.

One of the problems which we Designer users sometimes encounter is Affinity's – shall we say – sub-optimal SVG output which can trip up other software, especially that which outputs to cutters, etc. That is one of the points which David made.

The practical upshot is that we sometimes have to take a specific approach to a design and use very particular export settings in order to get the expected result at the far end of the chain.

* * *

That said (or typed anyway), it's probably not entirely apropos of your problem, so don't let me take you off track here.

In this case, I think that it may have been easier for people to help you towards a solution if you had uploaded your .afdesigner file, although I notice that you are using AD 1.x. Someone could look at it and explain exactly what you should do.

Link to comment
Share on other sites

Thanks, that's a good idea to upload the file.  Here it is.  Thanks, all!  I would be happy with a solution in Affinity to be able to end up with three compound paths, one for black, green and rust.  Or alternatively, a solution to having the file workable (not showing with black in the circle) when opened in Illustrator.  Thanks so much!

Hello Spring Test File.afdesign

Link to comment
Share on other sites

I can't think why it would make any difference, but many of the little black ellipses in the 'Lower Floral Design' group are rotated by an odd amount like -165.7°.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)

Link to comment
Share on other sites

ajuliea, I assume your second post shows an Affinity generated pdf opened in Illustrator then a screenshot of the same file opened in LightBurn 1.0.04 presumably on your daughter's pc?
I don't understand why Illustrator is being used apart from viewing the pdf however it looks like LightBurn is doing the mangling

I can't follow your ungroup then select all black objects as I don't have Designer but I did similar using Inkscape and have reformatted the file into different groups, all objects are now curves.
The black circles had a #EBEBEB fill with zero opacity
style="fill:#ebebeb;fill-opacity:0;stroke:#000;stroke-width:4.17px;" which is valid xml but may be upsetting LightBurn so I've changed them to
style="fill:none;stroke:#000;stroke-width:4.17px;"

The attached file produces a proper svg and all objects are paths or curves in Affinity speak, it's an afpub but will open ok in Designer. If it doesn't work I am out of ideas

LightBurn can accept pdf's or svg's, the advantage of using svg is that you can inspect the file with a text editor to troubleshoot if something goes wrong

Affinity is a pain to generate curves from ellipses and rectangles as I mentioned before, probably the best way is to select the relevant layers then do <alt>Add which will produce a compound thus retaining the ellipses inside it but will generate paths on svg export. Also tick Export text as curves. If you're using pdf then convert the text before export
Example

image.png.fddb611718b7515ef7d17736291b8436.png

And this is what the svg contains
<g id="Ellipses2Curves">
<circle cx="390.096" cy="88.386" r="35.105" style="fill:none;stroke:#000;stroke-width:7px;"/>
<circle cx="390.096" cy="202.136" r="35.105" style="fill:none;stroke:#000;stroke-width:7px;"/>
<circle cx="390.096" cy="317.455" r="35.105" style="fill:none;stroke:#000;stroke-width:7px;"/>
</g>

<g id="EllipsesInCompoundAdd">
<path d="M70.813,282.35c19.375,-0 35.105,15.73 35.105,35.105c0,19.375 -15.73,35.105 -35.105,35.105c-19.375,-0 -35.105,-15.73 -35.105,-35.105c0,-19.375 15.73,-35.105 35.105,-35.105Zm0,-115.319c19.375,0 35.105,15.73 35.105,35.105c0,19.375 -15.73,35.105 -35.105,35.105c-19.375,-0 -35.105,-15.73 -35.105,-35.105c0,-19.375 15.73,-35.105 35.105,-35.105Zm0,-113.75c19.375,-0 35.105,15.73 35.105,35.105c0,19.375 -15.73,35.105 -35.105,35.105c-19.375,-0 -35.105,-15.73 -35.105,-35.105c0,-19.375 15.73,-35.105 35.105,-35.105Z" style="fill:none;stroke:#000;stroke-width:7px;"/>
</g>

Good luck

Edit: there's a mistake in the text layer, the fill of the letters should be none and the strokes expanded to say 2pt

HelloSpringTestFile.afpub

Edited by David in Яuislip
as noted

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

The file looks great, David.  Thanks so much.   Is it possible to compound further all the green elements.  When I tried to compound the two horizontal lines, they once again disappeared.  And when I tried to compound the upper and lower green layers, for eg., add is grayed out.   Ideally, I would like just 3 elements in the final layers panel, one for each colour.  But what you have done is amazing and I appreciate it so much.  

Also, I have other files like this one so not sure what to do going forward.  Thanks, again!

Link to comment
Share on other sites

You can't Boolean Add the two horizontal lines but you can do Layer/Geometry/Merge Curves to combine them. Note this is Publisher speak, Designer may be slightly different.
To combine all the blacks, select all of the layers within UpperBlack then drag them into LowerBlack

image.png.c2ed1d5a10203fca5025b63e7d3698dc.png


Repeat for greens including the two horizontal lines, there is no need to merge the lines
I have deleted all layer names within the groups, if you leave them they will create millions of serif ids in an svg which is just bloat, no idea what happens with a pdf

Going forward you first need to find out what was wrong with the previous version. I would do a practice run from scratch with a few basic shapes, text and lines.
If you are using ellipses or rectangles you can either use a Boolean Compound Add or Layer/Geometry/Merge Curves to get the shapes into a common grouping.
My earlier concern about the combined paths was probably unfounded, I ran some tests in Inkscape getting it to produce GCode which is what controls the laser. The program split all of the sub paths into separate entities and wrote the correct laser on/off codes so I would expect LightBurn to do the same even if your laser uses something other than GCode
All text must be converted to curves
Avoid colour fill with zero opacity just set the fill to none

If you're still stuck I would ask on the Lightburn forum where you'll likely get some expert advice

HelloSpringTestFile2.afpub

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

David, I can't thank you enough for your help.  I have sent the file to my daughter for testing but she's having a busy day.  Hoping for the best.  Your generosity in giving your time to solve my problem is so appreciated.  Have a great day!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.