Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/p/v/pvtrace-HEAD/pvtrace/Geometry.py   pvtrace(Download)
def transform_direction(direction, transform):
    try:
        angle, axis, point = tf.rotation_from_matrix(transform)
    except ValueError:
        if tf.is_same_transform( tf.identity_matrix() * -1, transform ):
    if cmp_floats(thedot, 1.) == True:
        # Vectors are parallel
        return tf.identity_matrix()
 
    if cmp_floats(thedot, -1.) == True:
        # Vectors are anti-parallel
        # print "Vectors are anti-parallel this might crash."
        return tf.identity_matrix() * -1.
        self.transform = transform
        if self.transform == None:
            self.transform = tf.identity_matrix()
 
    def append_transform(self, new_transform):
        self.extent = np.array(extent)
        self.points = [origin, extent]
        self.transform = tf.identity_matrix()
 
    def append_transform(self, new_transform):

src/p/v/pvtrace-HEAD/pvtrace/ConstructiveGeometry.py   pvtrace(Download)
        self.ADDtwo = ADDtwo
        self.reference = 'CSGadd'
        self.transform = tf.identity_matrix()
 
    def append_name(self, namestring):
        self.SUBminus = SUBminus
        self.reference = 'CSGsub'
        self.transform = tf.identity_matrix()
 
    def append_name(self, namestring):
        self.INTtwo = INTtwo
        self.reference = 'CSGint'
        self.transform = tf.identity_matrix()
 
    def append_name(self, namestring):