![]() |
#1
|
||||
|
||||
![]()
I was wondering if anyone knows of a script or could help me write a short script that I can use to reduce the amount of nodes in a resulting shape "contour", <CTRL-F9> in CD 11, and still maintain the new shapes integrity. What I would ulimately like to do is create a user form that will take a selected outline shape and ask for an offset amount, inside or outside, and then break apart the resulting countour and clean up the excessive nodes on the new shape.
![]()
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#2
|
||||
|
||||
![]()
Here is a simple macro for you to start with. It creates a single-step contour outside with offset of 0.1", then breaks it apart and if the resulting contour step object is a curve, it reduces the number of nodes so that the shape of the curve stays accurate within 0.01". The reason why we need to test if the result is a curve is because controur will produce, say, rectangles if the original shape is a rectangle.
Code:
Sub CreateSimpleContour() Dim sCurve As Shape Dim eff As Effect Set eff = ActiveShape.CreateContour(cdrContourOutside, 0.1, 1, _ cdrDirectFountainFillBlend, _ CreateCMYKColor(0, 0, 0, 100), _ CreateCMYKColor(0, 0, 0, 100), _ CreateCMYKColor(0, 0, 0, 100), 0, 0) Set sCurve = eff.Separate(1) If sCurve.Type = cdrCurveShape Then sCurve.Curve.Nodes.All.AutoReduce 0.01 End If End Sub ![]() |
#3
|
||||
|
||||
![]()
Thanks! I'll keep the group posted on the progress of this project.
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#4
|
||||
|
||||
![]()
So far I have created the Module and form below to work out this problem. It works fine up to a point. For some reason, depending on the shape or whatever, the new outline "flattens" out some of the areas where there should be curves. It seems to happen on areas where the curve angle between two nodes is greater than 90º, but this is just a theory right now. Is there something that I can do to keep those lines between the nodes curved, or am I just wishful thinking?
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
problems with nodes | jmalmsteen | CorelDRAW/Corel DESIGNER VBA | 1 | 14-06-2005 12:23 |
It is a bug? (Reflecting Nodes) | Hernán | General | 0 | 26-10-2004 01:13 |
Reducing Nodes Semi Automatic | Superfreak | New product ideas | 2 | 05-10-2004 02:10 |
Convert cure or segment to many Nodes | -=HKLC=- | CorelDRAW/Corel DESIGNER VBA | 2 | 04-10-2004 20:30 |
Select all nodes if the subpath | d-signer | CorelDRAW/Corel DESIGNER VBA | 2 | 12-05-2004 23:47 |