Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm having some problems with it #202

Closed
ChenyangCao1999 opened this issue May 6, 2024 · 1 comment
Closed

I'm having some problems with it #202

ChenyangCao1999 opened this issue May 6, 2024 · 1 comment

Comments

@ChenyangCao1999
Copy link

import numpy as np
import matplotlib.pyplot as plt
from phidl import Path,Device,Layer,CrossSection
from phidl import quickplot as qp
import phidl.geometry as pg
import phidl.path as pp
P=Path([(20,10), (30,10), (40,30), (50,30), (50,20), (55,20)])
D = P.extrude(0.5)
Via = pg.ellipse(radii = (0.5,0.2), layer = 3)
distances = np.linspace(0, P.length(), 35)
offset = 1
points, angles = P.interpolate(distances, offset)
for (x,y), a in zip(points, angles):
via = D << Via
via.rotate(a)
via.center = x,y
qp(D)

Traceback (most recent call last):
File "d:\code\2024_5_6.py", line 57, in
points,angles=P.interpolate(distances,offset)
^^^^^^^^^^^^^
AttributeError: 'Path' object has no attribute 'interpolate'

@amccaugh
Copy link
Owner

amccaugh commented May 6, 2024

Have you upgraded to the latest version of phidl? pip install -U phidl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants