Ejemplo n.º 1
0
def get_ePMV():
    """
    Retrieve the embeded PMV session.

    @rtype:   object
    @return:  the current ePMV session
    """    
    import upy
    uiclass = upy.getUIClass()
    hclass = upy.getHelperClass()    
    #epmv = None    
    #c4d use the current document name
    epmv = uiclass._restore('mv','epmv')
    if epmv is None :
        dname = hclass.getCurrentSceneName()
        epmv = uiclass._restore('mv',dname)
    return epmv
Ejemplo n.º 2
0
def get_ePMV():
    """
    Retrieve the embeded PMV session.

    @rtype:   object
    @return:  the current ePMV session
    """
    import upy
    uiclass = upy.getUIClass()
    hclass = upy.getHelperClass()
    #epmv = None
    #c4d use the current document name
    epmv = uiclass._restore('mv', 'epmv')
    if epmv is None:
        dname = hclass.getCurrentSceneName()
        epmv = uiclass._restore('mv', dname)
    return epmv
Ejemplo n.º 3
0
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with autoPACK (See "CopyingGNUGPL" in the installation.
#    If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
@author: Ludovic Autin with design/editing/enhancement by Graham Johnson
"""
import sys,os
import random
import numpy
from math import sqrt
import upy
uiadaptor = upy.getUIClass()

from upy.colors import red, green, blue, cyan, magenta, yellow, \
     pink, brown, orange, burlywood, darkcyan, gainsboro
from upy import colors as upy_colors

from bhtree import bhtreelib
import autopack
from autopack.Ingredient import SingleSphereIngr, MultiSphereIngr
from autopack.Ingredient import MultiCylindersIngr,GrowIngrediant,ActinIngrediant
from autopack.Ingredient import IOingredientTool

def principal_axes(points,return_eigvals=False):
    """
    From http://python-geoprobe.googlecode.com/hg-history/eabee6e95acc3e110ebc36a3fc587e25942cd430/geoprobe/utilities.py        
    Finds the principal axes of a 3D point cloud.
Ejemplo n.º 4
0
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with autoPACK (See "CopyingGNUGPL" in the installation.
#    If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
@author: Ludovic Autin with design/editing/enhancement by Graham Johnson
"""
import sys, os
import random
import numpy
from math import sqrt
import upy
uiadaptor = upy.getUIClass()

from upy.colors import red, green, blue, cyan, magenta, yellow, \
     pink, brown, orange, burlywood, darkcyan, gainsboro
from upy import colors as upy_colors

from bhtree import bhtreelib
import autopack
from autopack.Ingredient import SingleSphereIngr, MultiSphereIngr
from autopack.Ingredient import MultiCylindersIngr, GrowIngrediant, ActinIngrediant
from autopack.Ingredient import IOingredientTool


def principal_axes(points, return_eigvals=False):
    """
    From http://python-geoprobe.googlecode.com/hg-history/eabee6e95acc3e110ebc36a3fc587e25942cd430/geoprobe/utilities.py