Keith

Forum Replies Created

Viewing 15 posts - 526 through 540 (of 861 total)
  • Author
    Posts
  • in reply to: Viewing properties of a polygon shape screw it up… #1240
    Keith
    Keymaster

    Hmm, I just tried on the mac with the same version. Opened the example.tch file, selected layer OD as the active layer, set snap to any angle.

    I then entered two points of an arbitrary triangle, and hit return to close the triangle.

    I then selected it, hit Q to query it, then OK. No change in the polygon.

    I did notice that when creating it, it has a duplicate end point – this should be fixed. In the meantime can you say what you might be doing differently so I can reproduce this?

    thanks

    Keith

    in reply to: Boolean operations in python script ? #1237
    Keith
    Keymaster

    Yes, you can use the geom… functions described in the verification section of the manual.

    e.g.

    Code:
    from ui import *

    cv = ui().getEditCellView()

    # Initialise the geometry engine
    geomBegin(cv)

    #Do some boolean stuff
    active = geomGetShapes("active", "drawing")
    poly = geomGetShapes("poly", "drawing")
    diff = geomAndNot(active, poly)

    # save the result
    saveDerived(diff, "diff", "drawing", cv.viewName())

    # update the cellView
    cv.update()

    # Exit the geometry engine, freeing memory.
    geomEnd()

    All you need to remember is the geom… functions generally return python objects which are in fact edgefiles, so they can only be used by other geom… commands.

    You can put any python code in that you like.

    – Keith

    in reply to: Python dbCreatePCellInst seg. fault #1234
    Keith
    Keymaster

    OK, I have implemented a better solution.

    Glade will (as before) automatically add the directory containing ui.py to Python's sys.path. So provided you only care about loading python modules from this (and the other directories in sys.path) then you do not need to set PYTHONPATH.

    If you're developing a pcell library, you probably don't want to put all your pcells in the Glade installation hierarchy though. In which case, you need to put them somewhere, and add that somewhere to PYTHONPATH.

    I've added this as a patch to the Mac 4.3.12 build now. I will add it in for other platforms later, as its not so urgent for them.

    cheers,

    Keith

    in reply to: Python dbCreatePCellInst seg. fault #1233
    Keith
    Keymaster

    Hi David,

    After having a look at the problem, it is caused by PYTHONPATH not being defined.

    As mentioned in the 4.3.12 release notes, although PYTHONPATH no longer needs to be set for loading python modules e.g. ui.py, it is still (currently) required for PCells to work correctly.

    The reason relates to the fact that during the creation of a pcell, not only is the python code that has already been loaded evaluated by the python interpreter, but the original pcell file is parsed (in C++) to get the names and default values of the properties associated with the pcell, in order to add these to the supermaster.

    This may be possible to change – I have some ideas of how. In the meantime you need to set your PYTHONPATH env var to include the directory that contains the pcells.

    The easiest way is as documented in the README.txt file to use XCode to edit the Info.plist file in glade.app/Contents.

    An alternative is to edit /etc/launchd.conf and set the PYTHONPATH there. This sets the env var for all apps, rather than the previous method which just sets it for a specific app.

    Again, a better solution is needed and will be worked on but in the meantime please either run from a command line with the env var set, or set the env var in the ways described if you want to launch the app from the icon.

    – Keith

    in reply to: Python dbCreatePCellInst seg. fault #1231
    Keith
    Keymaster

    Sorry David,

    I was thinking of another function while rushing out of the house this morning…

    dbCreatePCellInst() should work, as described in the 'PCells' section of this forum.

    I'll check this and when I'm back will let you know what I find.

    – Keith

    in reply to: Python dbCreatePCellInst seg. fault #1229
    Keith
    Keymaster

    Just use dbCreateInst() to create an instance of the pcell. dbCreatePCellInst() was intended for something else, and has never been used/tested.

    in reply to: Setting PYTHONPATH #1219
    Keith
    Keymaster

    That's good to know.

    About changing the version of python – currently Glade expects to link to the Mac python (version 2.7 by default). To use another version of Python, I'd have to install and link to that – which although possible, may be messy on a single machine.

    in reply to: Setting PYTHONPATH #1217
    Keith
    Keymaster

    Hmm, odd. I'm running OSX 10.8.1, you should see printed in the log just after the Python version something like:

    >>> # Adding python module path: /Users/keith/Documents/C++/glade4_mac64.

    or it it fails, a message like

    >>> # Cound not add python module path: …

    Can you try:

    import sys
    print sys.path

    ?

    Also you might want to try re-downloading th mac version in case you got a slightly older version of 4.3.11, it was updated shortly after initially becoming available.

    in reply to: Python scripting: inst.Move() not implemented? #1214
    Keith
    Keymaster

    Hi FriendFX,

    Hmm, the documentation is out of date here. I will update it for the general 4.3.12 release. Move takes 2 arguments: the cellView the object is contained in, and the delta to move it by.

    Here's an example to move a selected instance:

    Code:
    # Get the selected set
    selset = getSelectedSet()

    # Pop an object from the list
    inst= selset.pop()

    p = Point(0, 10000)
    cv = getEditCellView()

    # Move the inst in the cellView by 10um in the Y direction
    inst.Move(cv, p)

    # Update the cellView
    cv.update()

    It's important to call cv.update() after modifying anything in the cellView. This updates the object in the binary tree which is used for searching – without doing this you will see the 'weird display problems' you mention, as e.g. zooming searches the tree for objects in the display window to draw, and if the tree has not been updated then it's going to think the object is still in its old position.

    Of course you can just change the inst origin, again call cv.update() after.

    Hope this helps,

    Keith

    in reply to: LVS comparison #1210
    Keith
    Keymaster

    This should now be fixed in 4.3.10 – thanks to Francesc for debugging the problem.

    in reply to: LVS comparison #1208
    Keith
    Keymaster

    FYI I gave it a quick try on the Mac version and that runs OK, so it looks like it might be platform specific.

    in reply to: LVS comparison #1206
    Keith
    Keymaster

    Hi Francesc,

    I am currently travelling this week so will not be able to take a look at this further until Friday. But I'll put it to the top of the list to look at then.

    regards,

    Keith

    in reply to: Drawing text with layer #1205
    Keith
    Keymaster

    Hi David,

    You mean a simple font generator that would generate polygons on a layer that when viewed represent ASCII characters? Currently there is no built in way of doing this, although a python script could probably be implemented to do such a thing and generate simple stick-like fonts. I guess you'd also need to control the font size (and possibly make it DRC correct, which may be more tricky)?

    regards

    Keith

    in reply to: hierarchical pcells #1201
    Keith
    Keymaster

    Actually thinking about it, it should be possible to create hierarchical pcells already. If you look the forum entry under Pcells called 'Creating and using pcells from within a script' it describes how you can create a pcell instance from a python script. Which could of course be another pcell python script itself.

    Parameter passing is then just a case of adding the appropriate properties onto the created pcell instance.

    Also note you should load all pcells using the loadPCell() command before attempting to create instances of them.

    in reply to: Version 4.3.7 #1199
    Keith
    Keymaster

    Version 4.3.7 has been updated today, Sunday 5th August at about 13:50 UK time. So if you uploaded a 4.3.7 build before then please re-download as there were one or two last minute fixes that crept in.

Viewing 15 posts - 526 through 540 (of 861 total)