function doExecute(\Classes\Controller\Controller\Request $request) { \Classes\Utils\Timer\Timer::start('MODEL_EXPORT'); // Получаем переменные $filename = $request->getProperty('filename'); $path = \Classes\Controller\Util\Utils::tempPath() . DIRECTORY_SEPARATOR . $filename; // NUMERATION \Classes\Utils\Member\Numeration::numerateFromOne(); \Classes\Utils\Node\Numeration::numerateFromOne(); // EXPORT \Classes\Factory\Export\Scad21ExportFactory::export($path); \Classes\Utils\Timer\Timer::stop('MODEL_EXPORT'); $request->addFeedback(\Classes\Utils\Timer\Timer::show('MODEL_EXPORT')); include \Classes\Controller\Util\Utils::createViewName('exportModelToScad21'); }
$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>"; }