python_code stringlengths 0 992k | repo_name stringlengths 8 46 | file_path stringlengths 5 162 |
|---|---|---|
NanoCAD-master | cad/src/cnt/commands/__init__.py | |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
BuildNanotube_PropertyManager.py
@author: Ninad, Mark
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
History:
2008-01-11 Ninad: Created
"""
import foundation.env as env
from PyQt4.Qt import SIGNAL
from PM.PM_Grou... | NanoCAD-master | cad/src/cnt/commands/BuildNanotube/BuildNanotube_PropertyManager.py |
NanoCAD-master | cad/src/cnt/commands/BuildNanotube/__init__.py | |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
BuildNanotube_GraphicsMode.py
@author: Ninad, Mark
@copyright: 2008 Nanorex, Inc. See LICENSE file for details.
@version:$Id$
History:
TODO as of 2008-05-06:
Needs Refactoring. It was originally duplicated from BuildDna_GraphicsMode
(for an experimen... | NanoCAD-master | cad/src/cnt/commands/BuildNanotube/BuildNanotube_GraphicsMode.py |
# Copyright 2007-2009 Nanorex, Inc. See LICENSE file for details.
"""
BuildNanotube_EditCommand.py
@author: Ninad
@version: $Id$
@copyright: 2007-2009 Nanorex, Inc. See LICENSE file for details.
History:
Ninad 2008-01-11: Created
"""
from command_support.EditCommand import EditCommand
from utilities.Log import gr... | NanoCAD-master | cad/src/cnt/commands/BuildNanotube/BuildNanotube_EditCommand.py |
NanoCAD-master | cad/src/cnt/commands/InsertNanotube/__init__.py | |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
InsertNanotube_EditCommand.py provides an editCommand object for
generating a nanotube (CNT or BNNT). This command should be invoked only from
NanotubeProperties_EditCommand
@author: Mark Sims, Ninad Sathaye
@version: $Id$
@copyright: 2007-2008 Na... | NanoCAD-master | cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py |
# Copyright 2004-2008 Nanorex, Inc. See LICENSE file for details.
"""
InsertNanotube_PropertyManager.py
@author: Mark Sims
@version: $Id$
@copyright: 2004-2008 Nanorex, Inc. See LICENSE file for details.
Mark 2008-03-09:
- Created. Copied and edited InsertDna_PropertyManager.py.
"""
__author__ = "Mark"
from PyQt4... | NanoCAD-master | cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py |
# Copyright 2008-2009 Nanorex, Inc. See LICENSE file for details.
"""
EditNanotube_EditCommand.py
@author: Ninad, Mark
@version: $Id$
@copyright: 2008-2009 Nanorex, Inc. See LICENSE file for details.
While in this command, user can
(a) Highlight and then left drag the resize handles located at the
two 'endpoint... | NanoCAD-master | cad/src/cnt/commands/EditNanotube/EditNanotube_EditCommand.py |
# Copyright 2008-2009 Nanorex, Inc. See LICENSE file for details.
"""
EditNanotube_GraphicsMode.py
Graphics mode for EditNanotube_EditCommand.
While in this command, user can
(a) Highlight and then left drag the resize handles located at the
two 'endpoints' of the nanotube to change its length.
(b) Highlight and... | NanoCAD-master | cad/src/cnt/commands/EditNanotube/EditNanotube_GraphicsMode.py |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
EditNanotube_PropertyManager.py
@author: Ninad, Mark
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
TODO: as of 2008-01-18
See EditNanotube_EditCommand for details.
"""
from PyQt4.Qt import SIGNAL
from PM.PM_GroupBox ... | NanoCAD-master | cad/src/cnt/commands/EditNanotube/EditNanotube_PropertyManager.py |
NanoCAD-master | cad/src/cnt/commands/EditNanotube/__init__.py | |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
EditNanotube_ResizeHandle.py
@author: Ninad, Mark
@copyright: 2008 Nanorex, Inc. See LICENSE file for details.
@version: $Id$
@license: GPL
TODO:
Attributes such as height_ref need to be renamed. But this should really be done
in the superclass... | NanoCAD-master | cad/src/cnt/commands/EditNanotube/EditNanotube_ResizeHandle.py |
# Copyright 2007-2009 Nanorex, Inc. See LICENSE file for details.
"""
@author: Ninad, Mark
@copyright: 2007-2009 Nanorex, Inc. See LICENSE file for details.
@version: $Id$
@license: GPL
TODO:
- User Preferences for different rubberband line display styles
"""
from utilities.constants import gray, black, dark... | NanoCAD-master | cad/src/cnt/temporary_commands/NanotubeLineMode.py |
NanoCAD-master | cad/src/cnt/temporary_commands/__init__.py | |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
ExprsMeta.py -- one metaclass, to take care of whatever is best handled using a metaclass,
and intended to be used for all or most classes in this module.
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for detai... | NanoCAD-master | cad/src/exprs/ExprsMeta.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Boxed.py -- example of high-level layout expr
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
See also: DraggablyBoxed
"""
from utilities.constants import white
from exprs.Rect import RectFrame
f... | NanoCAD-master | cad/src/exprs/Boxed.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
geometry_exprs.py -- time-varying geometric primitives that can know their units & coordinate system.
$Id$
About this module's filename:
I might have just called it geometry.py, but that name is taken in cad/src
(though perhaps that file deserves to b... | NanoCAD-master | cad/src/exprs/geometry_exprs.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
ToggleShow.py
$Id$
#e needs cleanup
"""
##nim: [obs? maybe not]
## StateRef, syntax and implem
## see comments from 061121
#
##e see also old code in ToggleShow-outtakes.py
# Hmm, I discovered by accident 061203 1007p that the following were... | NanoCAD-master | cad/src/exprs/ToggleShow.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
demo_drag.py
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
demo not only some drag actions, but some ways of setting up new model types
and their edit tools and behaviors. [Eventually.]
[for cur... | NanoCAD-master | cad/src/exprs/demo_drag.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
testmode.py -- Command/GraphicsMode for testing graphical exprs
(implemented in the exprs module).
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
How to use:
[see also exprs/README.txt, which is... | NanoCAD-master | cad/src/exprs/testmode.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
test_statearray.py
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
"""
from exprs.Column import SimpleRow
from exprs.Rect import Rect
from exprs.Highlightable import Highlightable
from exprs.Boxed import ... | NanoCAD-master | cad/src/exprs/test_statearray.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
demo_MT.py - demo of "model tree in GLPane" (primitive, but works)
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
### WARNING: the rest of this docstring has not been reviewed since before MT_try2 was imple... | NanoCAD-master | cad/src/exprs/demo_MT.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Overlay.py
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
from exprs.TextRect import TextRect
from exprs.Rect import Spacer
from exprs.attr_decl_macros import Arg
from exprs.instance_helpers... | NanoCAD-master | cad/src/exprs/Overlay.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
transforms.py - provide Translate [and more later]
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
Translate was developed in Center.py, split out of that 061115
plan: include things like Rotate an... | NanoCAD-master | cad/src/exprs/transforms.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
world.py -- prototype Model Data Set owning/storing object, not yet very general.
$Id$
070201 Moved here from demo_drag.py.
Class & file likely to be renamed -- but not to DataSet since that's different --
it's a subset of refs to data already in the... | NanoCAD-master | cad/src/exprs/world.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
DisplayListChunk.py
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
History:
061231 prototyped this code in NewInval.py
070102 moved it here 1-2 days ago, and revised it to seem correct; imports/r... | NanoCAD-master | cad/src/exprs/DisplayListChunk.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
controls.py - some simple controls, like ChoiceButton, ChoiceColumn/Row, checkbox_v3
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
TODO:
- also has some general things we need to refile
See also... | NanoCAD-master | cad/src/exprs/controls.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
demo_draw_on_surface.py
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
070319 a standalone version of the so-called polyline example in demo_drag.py (testexpr_19g)
See also:
- demo_polyline.py (an... | NanoCAD-master | cad/src/exprs/demo_draw_on_surface.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
draw_utils.py
$Id$
Note: this module does not really belong in the exprs package --
that's its main client, but it contains only pure OpenGL utilities.
"""
from OpenGL.GL import GL_TEXTURE_2D
from OpenGL.GL import glTexCoord2fv
from OpenGL.GL imp... | NanoCAD-master | cad/src/exprs/draw_utils.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
State_preMixin.py - help classes define change-tracked attributes using the State macro
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
History:
080910 bruce split this out of test_connectWithState... | NanoCAD-master | cad/src/exprs/State_preMixin.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
StatePlace.py - help InstanceOrExpr or its subclasses define and store state, in layers [#redoc that]
$Id$
note: this used to be part of staterefs.py; split it out on 061203
"""
from exprs.__Symbols__ import _self
from exprs.Exprs import call_Ex... | NanoCAD-master | cad/src/exprs/StatePlace.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
DragBehavior_AlongLine.py
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
the DragBehavior in this file improves on the one in test_statearray_2.py:
- uses its own coordsys, not the one in the High... | NanoCAD-master | cad/src/exprs/DragBehavior_AlongLine.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
ExprsConstants.py -- define constants and simple functions used by many files in this package
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
# Note: most or all of the imports from cad/src are... | NanoCAD-master | cad/src/exprs/ExprsConstants.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
clipping_planes.py -- support OpenGL clipping planes.
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
from OpenGL.GL import glEnable
from OpenGL.GL import glClipPlane
from OpenGL.GL import glDisa... | NanoCAD-master | cad/src/exprs/clipping_planes.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
reload.py -- handle dynamic reloading of code for developers
$Id$
Note: as of 070921 reload_once is no longer called except in testdraw.py.
"""
from utilities import debug_flags
import utilities.EndUser as EndUser
from utilities.debug import rel... | NanoCAD-master | cad/src/exprs/reload.py |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
ColorCube.py -- a cube of all RGB colors (though only the surface is visible)
@author: Bruce
@version: $Id$
@copyright: 2008 Nanorex, Inc. See LICENSE file for details.
"""
from geometry.VQT import V
from OpenGL.GL import GL_QUADS
from OpenGL.GL impo... | NanoCAD-master | cad/src/exprs/ColorCube.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
dna_ribbon_view.py
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
070125: started this from a copy of demo_dna-outtakes.py.
[Since then, that file has been cvs-removed -- see 070201 comment below.]
Eventu... | NanoCAD-master | cad/src/exprs/dna_ribbon_view.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
toolbars.py - OpenGL toolbars, basically serving as "working mockups" for Qt toolbars
(but someday we should be able to turn the same toolbar configuration code
into actual working Qt toolbars)
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, In... | NanoCAD-master | cad/src/exprs/toolbars.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
widget2d.py
$Id$
"""
###e rename module, to same caps? hmm, maybe just to widget, since it has that class too? or move that class?
from OpenGL.GL import GL_FALSE
from OpenGL.GL import glColorMask
from OpenGL.GL import GL_TRUE
from OpenGL.GL impor... | NanoCAD-master | cad/src/exprs/widget2d.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
draggable.py
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
070203 status: DraggableObject works, except:
- move/flush untested, and if it works, will require objs already with posn state
- moved/rotated co... | NanoCAD-master | cad/src/exprs/draggable.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
If_expr.py - provide the expr (or macro) If(cond, _then, _else) and related functions/classes
$Id$
Note: the current implem can't reside in Exprs.py since it uses higher-level features.
It's likely that this will be replaced someday with a lower-... | NanoCAD-master | cad/src/exprs/If_expr.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
staterefs.py - facilities for defining and referencing state,
in widget exprs which display it, edit it, operate on it, produce it
###e MIGHT RENAME, since widget_env has an attr or arg named this. state.py? might be confusing re State macro.
@aut... | NanoCAD-master | cad/src/exprs/staterefs.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
test_statearray_2.py
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
test code for one kind of constrained dragging
used in testexpr_35a in exprs/test.py
DEPRECATED -- replaced by test_statearray_... | NanoCAD-master | cad/src/exprs/test_statearray_2.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Center.py - alignment primitives
$Id$
might be renamed or merged
note: transforms.py was split out of here, 061115
"""
from exprs.transforms import Translate
from exprs.Exprs import V_expr
from exprs.attr_decl_macros import Arg
from exprs.insta... | NanoCAD-master | cad/src/exprs/Center.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
IorE_guest_mixin.py -- WILL BE RENAMED to fit class, when class is renamed
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
070815 split IorE_guest_mixin superclass out of InstanceOrExpr
and moved it... | NanoCAD-master | cad/src/exprs/IorE_guest_mixin.py |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
exprs.Arrow.py
@author: Ninad
@copyright: 2008 Nanorex, Inc. See LICENSE file for details.
@version:$Id$
History:
2008-03-02: Created
"""
from exprs.widget2d import Widget2D
from exprs.attr_decl_macros import ArgOrOption
from exprs.attr_decl_macros imp... | NanoCAD-master | cad/src/exprs/Arrow.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
testdraw.py -- drawing code for testmode, which tests the exprs package.
[for doc, see testmode.py]
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
BUGS:
- 081204: testmode messes up ruler text an... | NanoCAD-master | cad/src/exprs/testdraw.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
__init__.py -- control initial import order and side effects,
whenever any submodule of this exprs package is used.
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
# Note: I don't know whether t... | NanoCAD-master | cad/src/exprs/__init__.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
test_statearray_3.py
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
test code for one kind of constrained dragging
used in testexpr_35b thru 35d in exprs/test.py
the DragBehavior in this file [no... | NanoCAD-master | cad/src/exprs/test_statearray_3.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
exprs/test.py - tests of exprs package, accessible from testmode UI;
also some exprs/testmode support code (which ought to be refiled)
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
#e during d... | NanoCAD-master | cad/src/exprs/test.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
py_utils.py
$Id$
simple utility functions for python built-in types
"""
# note: the module basic.py imports * from this module.
class attrholder: pass
def identity(arg):
return arg
def interleave(elts, gaps):
"""Return an interleaved ... | NanoCAD-master | cad/src/exprs/py_utils.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
widget_env.py -- an environment for the instantiation and use of widget exprs
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
The environment is used for lexical replacement & instantiation,
and th... | NanoCAD-master | cad/src/exprs/widget_env.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
Rect.py -- provide Rect, RectFrame, and other simple 2d shapes
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
These are prototypes with imperfect arg syntaxes.
#e maybe rename this file to shapes.... | NanoCAD-master | cad/src/exprs/Rect.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
"""
# WARNING: there is an old version of this (same name TextRect) from cad/src/drawtest.py, still in use up there.
# Note: this uses fixed size for text on screen, regardless of depth -- we'll need to revise this someday. #e
# Plan: make ... | NanoCAD-master | cad/src/exprs/TextRect.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
lvals.py - various kinds of "lvalue" objects (slots for holding attribute values)
with special behavior such as usage-tracking and invalidation/update.
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.... | NanoCAD-master | cad/src/exprs/lvals.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
__Symbols__.py -- support for "from __Symbols__ import xxx",
to make a shared Symbol object within the exprs module.
$Id$
NOTE: This module replaces its entry in sys.modules with a
_FakeModule_for_Symbols object. That object probably doesn't suppo... | NanoCAD-master | cad/src/exprs/__Symbols__.py |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
@version: $Id$
TODO: as of 2008-02-12
This is a non-working DragBehavior_AlongCircle class , not called anywhere.
"""
from exprs.Highlightable import SavedCoordsys
from exprs.geometry_exprs import Ray
from exprs.Exprs import tuple_Expr
from exprs.attr_... | NanoCAD-master | cad/src/exprs/DragBehavior_AlongCircle.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
instance_helpers.py -- provides InstanceOrExpr and some related things
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
History (partial):
070129 moved still-nim GlueCodeMemoizer into new file Colum... | NanoCAD-master | cad/src/exprs/instance_helpers.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
TestIterator.py
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
# not reviewed recently, was part of NewInval
# as of 061106 the setup looks obs, but it might as well be revived and tested befo... | NanoCAD-master | cad/src/exprs/TestIterator.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
images.py - provide some image-displaying utilities and primitives
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
semi-obs documentation:
Image(filename) # a tile, exact same size as image in fil... | NanoCAD-master | cad/src/exprs/images.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
DraggableHandle.py - some convenience exprs for draggable handles
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
Note about the name: we use DraggableHandle rather than DragHandle,
to avoid confusi... | NanoCAD-master | cad/src/exprs/DraggableHandle.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
pallettes.py
$Id$
"""
from exprs.Highlightable import Highlightable
from exprs.world import World
from exprs.Boxed import Boxed
from exprs.draggable import DraggableObject
from utilities.constants import blue, green
from exprs.Exprs import or_Exp... | NanoCAD-master | cad/src/exprs/pallettes.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
"""
# == local imports with reload
from utilities.debug import safe_repr
from utilities.debug import print_compact_stack
from exprs.Exprs import internal_Expr ###k probably not needed (imported by basic) but needs test
from exprs.py_utils import... | NanoCAD-master | cad/src/exprs/debug_exprs.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
Highlightable.py - general-purpose expr for mouse-responsive drawable objects
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
This will start out as just a straight port of class Highlightable from ... | NanoCAD-master | cad/src/exprs/Highlightable.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
demo_ui.py - try out a more CAD-like UI organization
@author: Bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
"""
from exprs.toolbars import MainToolbar
from exprs.command_registry import find_or_make_global_command_... | NanoCAD-master | cad/src/exprs/demo_ui.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
intern_ipath.py
$Id$
For now, this module doesn't officially support reload, though doing so won't erase its database --
since it might mix interned values with different intern-mappings into one database.
So basic.py doesn't try to reload it.
"""
# T... | NanoCAD-master | cad/src/exprs/intern_ipath.py |
# Copyright 2008 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
"""
from utilities.constants import white
from exprs.attr_decl_macros import Instance, Option
from exprs.transforms import Translate
from exprs.Center import Center
from exprs.ExprsConstants import StateRef, Vector
from exprs.ExprsConstants import... | NanoCAD-master | cad/src/exprs/DraggableHandle_AlongCircle.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
statearray.py
@author: bruce
@version: $Id$
@copyright: 2007 Nanorex, Inc. See LICENSE file for details.
"""
###e still UNFINISHED in some ways, the worst being that our elements are staterefs
# (see StateArrayRefs_getitem_as_stateref,
# and ###BUG com... | NanoCAD-master | cad/src/exprs/statearray.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
projection.py - utilities loosely related to setting up the projection matrix
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
from OpenGL.GL import glScalef
from OpenGL.GL import GL_MODELVIEW
f... | NanoCAD-master | cad/src/exprs/projection.py |
# Copyright 2006-2009 Nanorex, Inc. See LICENSE file for details.
"""
Exprs.py -- class Expr, and related subclasses and utilities, other than those involving Instances
@author: Bruce
@version: $Id$
@copyright: 2006-2009 Nanorex, Inc. See LICENSE file for details.
TODO:
this file is getting kind of long - maybe sp... | NanoCAD-master | cad/src/exprs/Exprs.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Set.py - provide the assignment action called Set, and (for now) the deprecated older variant SetStateRefValue.
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
Note: this operation name is importan... | NanoCAD-master | cad/src/exprs/Set.py |
# Copyright 2006-2008 Nanorex, Inc. See LICENSE file for details.
"""
attr_decl_macros.py -- Instance, Arg, Option, ArgOrOption, State
@author: Bruce
@version: $Id$
@copyright: 2006-2008 Nanorex, Inc. See LICENSE file for details.
[was in Exprs.py when developed, before State;
split into this file 061203 to ease r... | NanoCAD-master | cad/src/exprs/attr_decl_macros.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
command_registry.py
$Id$
register the types & commands [stub]
"""
from exprs.instance_helpers import InstanceOrExpr
###e THIS WILL BE REFACTORED before it is ever used, probably into a plain old dict, fully global for now, for the app object later,
#... | NanoCAD-master | cad/src/exprs/command_registry.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
iterator_exprs.py
$Id$
"""
from exprs.Exprs import list_Expr, constant_Expr
from exprs.Exprs import is_expr_Instance
from exprs.Exprs import is_pure_expr
from exprs.instance_helpers import DelegatingInstanceOrExpr
from exprs.attr_decl_macros import Arg... | NanoCAD-master | cad/src/exprs/iterator_exprs.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
demo_polyline.py -- demo file for Polyline datatype (too unsophisticated for real life) and related commands
$Id$
The "demo" in the filename indicates that this is not part of the exprs module per se,
but shows how to use it for a specific app. For use... | NanoCAD-master | cad/src/exprs/demo_polyline.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Column.py - provide SimpleColumn and SimpleRow, and someday, fancier Column and Row
[#e module might be renamed; otoh, if we have Table it'll be enough more complex to be in its own file]
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex... | NanoCAD-master | cad/src/exprs/Column.py |
# Copyright 2007-2008 Nanorex, Inc. See LICENSE file for details.
"""
DragBehavior.py - the DragBehavior API and some useful specific behaviors
@author: Bruce
@version: $Id$
@copyright: 2007-2008 Nanorex, Inc. See LICENSE file for details.
A DragBehavior
is a behavior in response to drag events
that a Drawable (c... | NanoCAD-master | cad/src/exprs/DragBehavior.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
$Id$
old code for ToggleShow [nim], taken from testdraw2_cannib.py
# types
##ImageWidget = Widget # not sure if we want this to be a definite subtype
# could it be renamed to Image? possible name conflict (probably ok): import Image # from the PIL l... | NanoCAD-master | cad/src/exprs/outtakes/ToggleShow-outtakes.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
$Id$
this file won't be in cvs for long -- but it might be there temporarily, since it's not yet fully cannibalized
#####@@@@@ need to decide whether we or the formula should do usage tracking and subscribe self.inval to what we use.
... | NanoCAD-master | cad/src/exprs/outtakes/lvals-outtakes.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
NewInval.py [to be cannibalized -- as of 061231, obs or mostly obs]
$Id$
061231 moved the displist comments and code from here to DisplayListChunk.py;
what remains here is obs or mostly obs
"""
# ==
# Tue 060919
# env + expr -> understood expr ... | NanoCAD-master | cad/src/exprs/outtakes/NewInval.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id
"""
outtakes file
# [this first part was written in test.py, thus the globalvar naming scheme.]
# 070228:
# How can we get the functions of both _19i and _30i in one integrated setup?
# Well, can we just display both their control panels (world_ui... | NanoCAD-master | cad/src/exprs/outtakes/demo_ui-outtakes.py |
# == old comments, might be useful (e.g. the suggested formulas involving in_drag)
# I don't think Local and If can work until we get WEs to pass an env into their subexprs, as we know they need to do ####@@@@
# If will eval its cond in the env, and delegate to the right argument -- when needing to draw, or anything ... | NanoCAD-master | cad/src/exprs/outtakes/Highlightable-old-demos.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
basic.py -- define things to be imported by every module in this package (using import *)
$Id$
"""
# Import order issues --
# This module basic gets imported first, and it will be imported at the beginning of most modules.
# But it wants to defin... | NanoCAD-master | cad/src/exprs/outtakes/basic.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
$Id$
WARNING: perhaps never tested since removed from demo_MT.py on 070210 --
essentially just an outtakes file, saved in case comments are still relevant;
mayb still be imported from test.py
"""
# == imports
from basic import *
from basic import _sel... | NanoCAD-master | cad/src/exprs/outtakes/demo_MT_try1_obs.py |
$Id$
## DraggableHandle(appearance = whatever, behavior = whatever, dragged_position = whatever)
# formulae
drag_behavior = Option( DragBehavior, SimpleDragBehavior,
doc = "our drag behavior (not including a stateref to dragged position)")
state = Option(StateRef, None,
... | NanoCAD-master | cad/src/exprs/outtakes/DraggableHandle-outtakes.py |
$Id$
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
this file should not remain in cvs once devel is done
class LvalForDisplistEffects(Lval): #stub -- see NewInval.py and paper notes
"""
Lval variant, for when the value in question is the total drawing effect of calling an OpenGL display... | NanoCAD-master | cad/src/exprs/outtakes/DisplayListChunk-outtakes.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
Animate.py [just notes so far]
$Id$
"""
"""
Animate [some thoughts, 061121]
on_press = Animate(args)
an Action which creates a temporary time-based formula... for interpolational-setting of the side effects listed,
or explicit formula for se... | NanoCAD-master | cad/src/exprs/scratch/Animate.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
demo_polygon.py [recently renamed from demo_dna.py]
$Id$
scratch file about Resizer, Draggable, and especially Interface...
and polygon-vertex dragging, for exploring some Draggable/DragCommand structure issues.
The specific code in it is mostly about... | NanoCAD-master | cad/src/exprs/scratch/demo_polygon.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
ModelNode.py
@author: bruce
@version: $Id$
@copyright: 2006-2007 Nanorex, Inc. See LICENSE file for details.
Note: as of sometime before 070129 this is an unfinished stub,
and it's not clear whether it will be used.
==
Introduction / history / ... | NanoCAD-master | cad/src/exprs/scratch/ModelNode.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
PixelTester.py
$Id$
"""
# PixelTester is untested -- not even fully parsed by python yet
##e needs save button, per-session filenames, access to on disk log of prior files,
# or way of reading new image from same file, and including reread-policy... | NanoCAD-master | cad/src/exprs/scratch/PixelTester.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
rendering.py -- rendering loop control, etc
$Id$
"""
IorE drawkid def should be sort of like:
def drawkid(self, kid):
warpfuncs = getattr(self.env.glpane, '_exprs__drawkid_funcs', None) #070218 or so new feature
while warpfunc... | NanoCAD-master | cad/src/exprs/scratch/rendering.py |
"""
$Id$
"""
# experimental, bruce 070814
class StatelessExpr: # probably not IorE... but might be if these are not needed to define that
_e_stateless_expr = True # should be F in super
pass
class AttrDeclExpr(StatelessExpr):
#e special behavior in the metaclass, or when used as a descriptor --
# expr... | NanoCAD-master | cad/src/exprs/scratch/AttrDeclExprs.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
Column_old_nim.py
$Id$
070129 moved from Column.py and instance_helpers.py;
this code is old and nim; implem is obs but intent is not (tho not urgent)
"""
from exprs.widget2d import Widget2D
from exprs.instance_helpers import InstanceOrExpr
from exprs... | NanoCAD-master | cad/src/exprs/scratch/Column_old_nim.py |
# Copyright 2006-2007 Nanorex, Inc. See LICENSE file for details.
"""
scratch6.py
$Id$
"""
# [061025; exploring a graph-editing eg, gets into interesting comments about
# exprs for behaviors, actions, events, potential & actual, command offers,
# and pattern syntax and semantics.]
# you can DND a new edge from one ... | NanoCAD-master | cad/src/exprs/scratch/scratch6.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
dna_ribbon_view_scraps.py
$Id$
outtakes from dna_ribbon_view.py which are importable now [070201] ###UNTESTED
and might be worth finishing and testing, or salvaging useful code/ideas from.
Any old code from demo_dna-outtakes.py that was still in dna_r... | NanoCAD-master | cad/src/exprs/scratch/dna_ribbon_view_scraps.py |
"""
test_animation_mode.py -- scratch code for animation loop, connectWithState, exprs drawing.
@author: Bruce
@version: $Id$
To run this code:
1. shell commands to make a symbolic link
(or you can copy it if you don't want to recommit your edits):
% cd ~/Nanorex/Modes
% ln -s /Nanorex/trunk/cad/src/exprs/scratch/t... | NanoCAD-master | cad/src/exprs/scratch/test_animation_mode.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
Command_scratch_1.py
$Id$
[061212 is the date of some small mods to make this parse -- probably it was mostly written
then or a few days before, within demo_drag.py]
070105 moved the pseudocode for Command & DragCommand class etc from demo_drag.py
in... | NanoCAD-master | cad/src/exprs/scratch/Command_scratch_1.py |
# Copyright 2007 Nanorex, Inc. See LICENSE file for details.
"""
rules.py
$Id$
This is really a scratch/notes file, though it has some code near the end that might become real.
"""
# Coming out of this comment just added to demo_drag.py:
# Summary of this and Vertex_new -- make use_VertexView work --
# [lo... | NanoCAD-master | cad/src/exprs/scratch/rules.py |
$Id$
class ControlPoint:
"""
abstract class for any kind of control point for use inside another object like a polyline;
subclasses can include ones on a reference object
# note: obs name: PointOnReferenceObject
"""
pass
class PolylineSegment:
"""
abstract class for any kind of polylin... | NanoCAD-master | cad/src/exprs/scratch/Polyline_G.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.