import sys
import os

import pyprt
from pyprt.pyprt_utils import visualize_prt_results

CS_FOLDER = os.path.dirname(os.path.realpath(__file__))


def asset_file(filename):
    return os.path.join(CS_FOLDER, 'data', filename)


# PRT Initialization
print('\nInitializing PRT.')
pyprt.initialize_prt()

if not pyprt.is_prt_initialized():
    raise Exception('PRT is not initialized')

# Data
rpk = asset_file('extrusion_rule.rpk')
attrs = {}

# STEP 1: Initial Shape (vertices coordinates)
initial_shape1 = pyprt.InitialShape(
    [0, 0, 0, 0, 0, 100, 100, 0, 100, 100, 0, 0])

# PRT Generation
print('\nFirst Generation:\n')
m1 = pyprt.ModelGenerator([initial_shape1])
Example #2
0
 def startTestRun(self):
     pyprt.initialize_prt()