Mirror Paths

A

Alec

Guest
All,

using the following to create a path from an enterPath()
and am wanting to create a copy of this path mirrored
to the adjacent left or right of the created path,
when using the dbCopyFig as shown below does not do this

pth1 = dbCreatePath(cv list("metal2" "drawing") lpts 12)
pth2 = dbCopyFig( pth1,nil, list(0:0 "MY" 1.0))
 
Is it because of the reference point (0:0) ?

Sylvain


On 18 juil, 07:21, Alec <h2s...@gmail.com> wrote:
All,

using the following to create a path from an enterPath()
and am wanting to create a copy of this path mirrored
to the adjacent left or right of the created path,
when using the dbCopyFig as shown below does not do this

pth1 = dbCreatePath(cv list("metal2" "drawing") lpts 12)
pth2 = dbCopyFig( pth1,nil, list(0:0  "MY" 1.0))
 
Hi,
You might want to take a look at the reference point as suggested.
Instead of:
pth2 = dbCopyFig( pth1,nil, list(0:0 "MY" 1.0))
Try:
pth2 = dbCopyFig( pth1 nil list( 2*caar(lpts)-12:0 "MY" 1.0))
pth2 = dbCopyFig( pth1 nil list( 2*caar(lpts)+12:0 "MY" 1.0))
where caar(lpts) shows the x-coordinate of the starting of the path,
and the 12 is the width offset.
Of course, this is assuming your path starts with a vertical line
(depending on -> lpts).
Else, you might want to use cadar(lpts).

Best regards,
I-FAB
 

Welcome to EDABoard.com

Sponsor

Back
Top