hello, I use very often strokes that are just some drawing lines, and at the end mostly I need fills / objects. So I use the function to expand strokes, many years in Illustrator which was fine. But I would like to handle this in CorelDraw also, as I work more and more only in CorelDraw. The function to convert contours to objects (expand strokes) is ok but I wish there could be either more options or just better results :).
Is there perhaps anywhere a macro to download or buy which has just this function for expand strokes in CorelDraw?
Thank you.
Convert Outline to Object works pretty good most of the times in my opinion, but may sometimes create some unnecessary nodes.Select all nodes and use Reduce Nodes in Property Bar afterwards, if it does. Keep an eye on the curves though since reducing the number of nodes may change the curves slightly.You can also try to use Contour instead of converting the curve but it takes a few more steps, especially if you want both the inner and outer edge of the "outline".These are the two options we have, and even if a macro was created, it would probably have to be based on either of these commands.
I asked this as I noticed that the outline to object works also differently in the different Corel version, but of course also differen from Illustrator (which I prefer for this function at the moment while I use CorelDraw for everything else).
I asked this also because I found in another forum a similar question and a user answered with a small macro. Not sure I am allowed to link to another forum and the macro code, the discussion was about converting cutlines to cbject.
When I tested this other macro, the result was quite different from the function in CorelDraw 2023. As I did not test long, I don't know if it works better, but it could be.
So after all I thought that there could be another macro (more recently) and perhaps a commercial macro for this.
hello Ronny and thank you. I have never tried Contour and don't know how it works. There are videos and help documents for it, so I will learn it. But to be sure, just the question to you whether you made anything specific to get the best result, so what steps did you take to make a good result?
By the way, perhaps this is even the answer to my macro question :). Isn't it then possible to record those steps to have a macro about "contour" as a tool to make those tasks?
ok I tried to use the contour function. I made 1 contour with little distance (0,025mm) and broke it apart. Do I understand it correctly that after that I just use the "convert to object" just as before?
So I made 1 contour and converted this then to object. Indeed it looks better, but has still one area with another error which was not there before. I made the contour task with another line and it was even worse.
So just let me know that I understood this correctly. If yes I will probably make those objects in Illustrator and import them back.
Adding a Contour to the open curve in your test file (test2.cdr) is very easy.Select the object and then the Contour tool.Check the outline width for the object (in this case 1,587 mm) and then type 1,587/2 in the contour offset box and hit Enter.Make sure you have the "Contour corners" setting in Property Bar/docker set to Rounded, since that is what the curve's outline has.This will add a contour around the open curve that (hopefully) looks like the original outline,and you can now remove the original outline (which also will be added to the contour object).Break apart and delete the original curve object if you don't need it.If you have a closed object, you have to do this twice unfortunately (since Draw doesn't havean automatic two sided contour), once for the outer edge and then again for the inner.This may sound complicated but is very easy to do once you get the hang of it.
thank you very much again, I understood this now! It is very obvious and good to know that this contour function is much better than then convert to object.
Perhaps I can record a macro when I always have the same outline width. Or even better something general always making this half width thing. But I don't know much about macros. Anyway, thanks!
hello and thanks again - I don't know the macros you mention, are those two different macros and where are they to choose?
Option ExplicitSub AddCutToOutline() Dim sr As ShapeRange, s As Shape Set sr = ActiveSelectionRange Optimization = False For Each s In sr If s.Outline.Justification = cdrOutlineJustificationMiddle And s.Outline.LineJoin = cdrOutlineRoundLineJoin Then Call CenterOutlineRound Else If s.Outline.Justification = cdrOutlineJustificationMiddle And s.Outline.LineJoin = cdrOutlineMiterLineJoin Then Call CenterOutlineSquare Else If s.Outline.Justification = cdrOutlineJustificationOutside And s.Outline.LineJoin = cdrOutlineMiterLineJoin Then Call OutsideOutlineSquare Else If s.Outline.Justification = cdrOutlineJustificationOutside And s.Outline.LineJoin = cdrOutlineRoundLineJoin Then Call OutsideOutlineRound Else If s.Outline.Justification = cdrOutlineJustificationInside Then Call InsideOutline End If End If End If End If End If Next sOptimization = FalseActiveWindow.RefreshEnd Sub
Sub CenterOutlineRound() 'only works on 1 shape Dim sr As ShapeRange, a#, s As Shape ActiveDocument.Unit = cdrInch Set sr = ActiveSelectionRange Optimization = True For Each s In sr a = s.Outline.Width If s.Outline.Justification = cdrOutlineJustificationMiddle Then If s.Outline.LineJoin = cdrOutlineRoundLineJoin Then Dim eff1 As Effect Set eff1 = sr(1).CreateContour(1, a / 2, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 2 .Parent.Separate.CreateSelection End With sr.RemoveFromSelection ActiveSelection.Fill.ApplyNoFill ActiveSelection.Outline.Width = 0.003 ActiveSelection.OrderToFront sr.RemoveFromSelection
End IfEnd If
Next sOptimization = FalseActiveWindow.Refresh
End Sub
Sub CenterOutlineSquare() Dim sr As ShapeRange, a#, s As Shape ActiveDocument.Unit = cdrInch Set sr = ActiveSelectionRange Optimization = True For Each s In sr a = s.Outline.Width If s.Outline.Justification = cdrOutlineJustificationMiddle Then If s.Outline.LineJoin = cdrOutlineMiterLineJoin Then Dim eff1 As Effect Set eff1 = sr(1).CreateContour(1, a / 2, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 3 .Parent.Separate.CreateSelection End With sr.RemoveFromSelectionActiveSelection.Fill.ApplyNoFillActiveSelection.Outline.Width = 0.003ActiveSelection.OrderToFrontEnd IfEnd Ifsr.RemoveFromSelectionNext sOptimization = FalseActiveWindow.Refresh
Sub InsideOutline() Dim sr As ShapeRange, a#, s As Shape ActiveDocument.Unit = cdrInch Set sr = ActiveSelectionRange Optimization = True For Each s In sr a = s.Outline.Width If s.Outline.Justification = cdrOutlineJustificationInside Then Dim eff1 As Effect Set eff1 = sr(1).CreateContour(cdrContourOutside, 0.001, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 3 .Parent.Separate.CreateSelection End With sr.RemoveFromSelectionActiveSelection.Fill.ApplyNoFillActiveSelection.Outline.Width = 0.003ActiveSelection.OrderToFront
Set eff1 = ActiveSelection.CreateContour(cdrContourInside, 0.001, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 3 .Parent.Separate.CreateSelection End With sr.RemoveFromSelection ActiveSelection.Fill.ApplyNoFillActiveSelection.Outline.Width = 0.003ActiveSelection.OrderToFrontActiveSelection.Shapes.First.RemoveFromSelectionActiveSelection.Delete
End IfNext sOptimization = FalseActiveWindow.RefreshEnd SubSub OutsideOutlineSquare() Dim sr As ShapeRange, a#, s As Shape ActiveDocument.Unit = cdrInch Set sr = ActiveSelectionRange Optimization = True For Each s In sr a = s.Outline.Width If s.Outline.Justification = cdrOutlineJustificationOutside Then If s.Outline.LineJoin = cdrOutlineMiterLineJoin Then Dim eff1 As Effect Set eff1 = sr(1).CreateContour(1, a, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 3 .Parent.Separate.CreateSelection End With sr.RemoveFromSelectionActiveSelection.Fill.ApplyNoFillActiveSelection.Outline.Width = 0.003ActiveSelection.OrderToFront
Next sOptimization = FalseActiveWindow.RefreshEnd SubSub OutsideOutlineRound()Dim sr As ShapeRange, a#, s As Shape ActiveDocument.Unit = cdrInch Set sr = ActiveSelectionRange Optimization = True For Each s In sr a = s.Outline.Width If s.Outline.Justification = cdrOutlineJustificationOutside Then If s.Outline.LineJoin = cdrOutlineRoundLineJoin Then Dim eff1 As Effect Set eff1 = sr(1).CreateContour(1, a, 1, 0, CreateCMYKColor(0, 99, 0, 0), CreateColor, CreateCMYKColor(0, 0, 0, 100), 0, 0, 2, 4, 15#) With eff1.Contour .EndCapType = 1 .CornerType = 2 .Parent.Separate.CreateSelection End With sr.RemoveFromSelectionActiveSelection.Fill.ApplyNoFillActiveSelection.Outline.Width = 0.003ActiveSelection.OrderToFrontEnd IfEnd IfNext sOptimization = FalseActiveWindow.RefreshEnd SubSub Macro1()End Sub
thank you very much! I could add the macro and it seems all is working.
The result in my first test is much better than the same function from CorelDraw :).
But honestly I do not know the difference between the single steps, or if I need all.
And could there be at the end the automatic delete of the curve while keeping the new objekt with not outline and the fill in the color of the curve before? That would be perfect.
...And could there be at the end the automatic delete of the curve while keeping the new objekt with not outline and the fill in the color of the curve before? That would be perfect...
I'm not following you here.
Use this image to describe how you would like the end result to be. Cut line to be the same color as the outline or...?
I started this because the CorelDraw function for "Convert Outline to Object" (similar from German) is making some trouble with extra nodes, steps and so on. Usually I draw or import curves (drawn by hand) and would like to make them to objects at a certain time.
So I have curves with an outline, and as result I want to have an objekt looking as the curve before, but as object = fill, and then no outline.
In Illustrator it's called expand strokes, I think. In CorelDraw the mentioned "convert".
So when I choose one, several or all of your macros, at the end I get a really nice object, but - in my case perhaps wrong - I still have the curve / outline there, and the object has no fill.