示例#1
0
    $memberLoadArray = $uploadFactory->upload('./Source/Excel/Small_Model/WO_Loads.xlsx', new \Classes\Instance\Load\Member\ConcentratedCommonMemberLoad());
    $notFoundObjects = Classes\Factory\Model\Addition\ConcentratedMemberLoadAddition::add($memberLoadArray);
    foreach ($notFoundObjects as $object) {
        $name = $object->getProperty('name')->get();
        echo "LOAD {$name} IS NOT FOUND<br/>";
    }
    echo "<br/>";
    Classes\Utils\Timer\Timer::stop('LOADS_UPLOAD');
    // UPLOAD CONSTRAINTS
    Classes\Utils\Timer\Timer::start('LOAD_CONSTRAINTS');
    $constraintArray = $uploadFactory->upload('./Source/Excel/Small_Model/Constraint.xlsx', new \Classes\Instance\Node\Constraint());
    foreach ($constraintArray as $object) {
        Classes\Factory\Model\Addition\ConstraintAddition::add($object);
    }
    Classes\Utils\Timer\Timer::stop('LOAD_CONSTRAINTS');
    // NUMERATION
    \Classes\Utils\Member\Numeration::numerateFromOne();
    \Classes\Utils\Node\Numeration::numerateFromOne();
    // Print
    Classes\Factory\Model\Model::servicePrint();
    Classes\Utils\Timer\Timer::servicePrint();
    echo '<hr />';
    // WRITE C++ FILE
    Classes\Factory\Export\Scad21ExportFactory::export("Model.cpp");
    // WRITE JSON FILE
    Classes\Factory\Export\JSONExportFactory::export("Model.json");
    // WRITE BINARY FILE
    Classes\Factory\Export\BinaryDataExportFactory::export("Model.bin");
} catch (Exception $e) {
    echo "Exception: " . $e->getMessage() . "</br>";
}