mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKit.git
synced 2026-01-15 00:35:08 +08:00
feat(studio): 更新晶格生成任务 source 的资源模型
Signed-off-by: 李东云 <dongyun.li@luxcreo.ai>
This commit is contained in:
@@ -23,14 +23,14 @@ use Singularity\HDK\Utils\Resource\ClassicResponse;
|
||||
* Powered by PhpStorm
|
||||
* Created on 2022/5/13
|
||||
*
|
||||
* @property string $modelId 要处理的模型文件 ID
|
||||
* @property string $modelUrl 要处理的模型文件完整路径
|
||||
* @property TaskLatticeAction $action 模型精度
|
||||
* @property \Singularity\HDK\Studio\Resource\Lattice $lattice 晶格
|
||||
* @property float $scalingRatio 密度比,两位小数
|
||||
* @property float $size 晶格尺寸
|
||||
* @property float $wide 杆径粗细
|
||||
* @property int $surfaceNum 面数
|
||||
* @property string $fileId 要处理的模型文件 ID
|
||||
* @property string $fileUrl 要处理的模型文件完整路径
|
||||
* @property TaskLatticeAction $action 模型精度
|
||||
* @property string $latticeId 晶格
|
||||
* @property float $scalingRatio 密度比,两位小数
|
||||
* @property float $size 晶格尺寸
|
||||
* @property float $wide 杆径粗细
|
||||
* @property int $surfaceNum 面数
|
||||
*/
|
||||
final class Lattice extends JsonResource
|
||||
{
|
||||
@@ -38,11 +38,12 @@ final class Lattice extends JsonResource
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
$action = $this->action ?? $this['action'];
|
||||
return [
|
||||
'modelId' => $this->modelId ?? $this['modelId'],
|
||||
'modelUrl' => $this->modelUrl ?? $this['modelUrl'],
|
||||
'action' => ($this->action ?? $this['action'])->getValue(),
|
||||
'lattice' => ($this->lattice ?? $this['lattice'])->title,
|
||||
'fileId' => $this->fileId ?? $this['fileId'],
|
||||
'fileUrl' => $this->fileUrl ?? $this['fileUrl'],
|
||||
'action' => is_string($action) ? $action : $action->getValue(),
|
||||
'lattice' => $this->latticeId ?? $this['latticeId'],
|
||||
'scalingRatio' => $this->scalingRatio ?? $this['scalingRatio'],
|
||||
'size' => $this->size ?? $this['size'],
|
||||
'wide' => $this->wide ?? $this['wide'],
|
||||
|
||||
Reference in New Issue
Block a user