Home Forums Nazca Connecting two different pins including rotation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6700
    Matthew Delaney
    Participant

    Hi, I had hoped this was simple but I’ve tried a few things and am a bit stuck.

    I have a cell that is essentially a taper (called “taper” my example code) that I want to call in other cells. Pin ‘a0’ is on the wider side, and pin ‘b0’ is on the thinner side. I want to call this cell, but be able to connect either pin to a waveguide, including the rotation.

    taper.put(waveguide.pin['b0'])

    works as expected with the ‘a0’ pin of the taper connected to the waveguide. However I don’t see an easy way to connect the waveguide pin ‘b0’ to the taper pin ‘b0’ in a way that would rotate the taper by 180 degrees. I hope this is clear, if not I can provide some diagrams.

    Thanks!

    taper.put(waveguide.pin['b0'])
    
    taper.put(waveguide.pin['b0']) #should connect pin 'a0' of the taper to the waveguide

     

    #6707
    Xaveer
    Moderator

    Dear Matthew,

    The standard way to do this is shown in the example below.

    import nazca as nd
    
     
    
    s = nd.strt(100, width=2).put(0, 0)  # default connecting pin is 'b0'
    
    # connects default s.pin['b0'] to default taper 'a0'
    
    nd.taper(width1=2, width2=10, length=100).put()
    
     
    
    s = nd.strt(100, width=2).put(0, 20)  # default connecting pin is 'b0'
    
    # connects default s.pin['b0'] to taper 'b0'
    
    nd.taper(width1=2, width2=10, length=100).put('b0')
    
     
    
    s = nd.strt(100, width=2).put(0, 40)  # default connecting pin is 'b0'
    
    # connects s.pin['a0'] to default taper 'a0'
    
    nd.taper(width1=2, width2=10, length=100).put(s.pin['a0'])
    
     
    
    s = nd.strt(100, width=2).put(0, 60)  # default connecting pin is 'b0'
    
    # connects s.pin['a0'] to taper 'b0'
    
    nd.taper(width1=2, width2=10, length=100).put('b0', s.pin['a0'])
    
     
    
    nd.export_plt()

     

    Xaveer

    #6708
    Matthew Delaney
    Participant

    Thanks, thats exactly what I was looking for.

    #6712
    Ronald
    Keymaster
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.