progress
This commit is contained in:
parent
559262db34
commit
50822a031d
65 changed files with 7738 additions and 1412 deletions
|
@ -16,6 +16,7 @@ export class ExecDatasetProcessScenario extends CallbackStrategyWithIdQuery {
|
|||
return (await new IsHaveActiveProcessUseCase().call()).map(async () => {
|
||||
await DatasetDBModel.findById(id).updateOne({ processStatus: "RUN" });
|
||||
model.local_path = `${model.local_path}/${FolderStructure.datasets}/`;
|
||||
|
||||
return new ExecProcessUseCase().call(
|
||||
`${model.project.rootDir}/`,
|
||||
`blenderproc run $PYTHON_BLENDER_PROC --cfg '${JSON.stringify(model)}'`,
|
||||
|
|
|
@ -12,6 +12,9 @@ export interface Parts {
|
|||
stlUrl: string;
|
||||
image: string;
|
||||
glUrl: string;
|
||||
daeUrl: string;
|
||||
objUrl: string;
|
||||
solidType: string;
|
||||
}
|
||||
|
||||
export class RobossemblerAssetsNetworkMapperScenario extends CallbackStrategyWithEmpty {
|
||||
|
@ -35,7 +38,10 @@ export class RobossemblerAssetsNetworkMapperScenario extends CallbackStrategyWit
|
|||
|
||||
el.stlUrl = `${assetAddress}${el.part_path}`;
|
||||
el.glUrl = `${assetLibsAddress}.glb`;
|
||||
el.daeUrl = `${assetLibsAddress}.dae`;
|
||||
el.objUrl = `${assetLibsAddress}.obj`;
|
||||
el.image = `${assetLibsAddress}.png`;
|
||||
el.solidType = 'active'
|
||||
return el;
|
||||
});
|
||||
return Result.ok(model);
|
||||
|
|
|
@ -13,6 +13,7 @@ export enum FolderStructure {
|
|||
weights = "weights",
|
||||
datasets = "datasets",
|
||||
behaviorTrees = "behavior_trees",
|
||||
robots = "robots",
|
||||
}
|
||||
|
||||
export class UploadCadFileToProjectScenario extends CallbackStrategyWithFileUpload {
|
||||
|
@ -20,24 +21,23 @@ export class UploadCadFileToProjectScenario extends CallbackStrategyWithFileUplo
|
|||
idValidationExpression = new MongoIdValidation();
|
||||
|
||||
async call(file: IFile, id: string): ResponseBase {
|
||||
return (await new ReadByIdDataBaseModelUseCase<IProjectModel>(ProjectDBModel).call(id)).map(
|
||||
async (databaseModel) =>
|
||||
(await new CreateFileUseCase().call(`${databaseModel.rootDir}/${file.name}`, file.data)).map(async () =>
|
||||
(
|
||||
await new ExecProcessUseCase().call(
|
||||
`${databaseModel.rootDir}/`,
|
||||
`python3 $PYTHON_BLENDER --path '${databaseModel.rootDir}/assets/'`,
|
||||
""
|
||||
)
|
||||
).map(async () =>
|
||||
(
|
||||
await new CreateManyFolderScenario().call(
|
||||
databaseModel.rootDir,
|
||||
Object.keys(FolderStructure).map((el) => `/${el}`)
|
||||
)
|
||||
).map(() => Result.ok("file upload and save"))
|
||||
return (await new ReadByIdDataBaseModelUseCase<IProjectModel>(ProjectDBModel).call(id)).map(async (databaseModel) =>
|
||||
(await new CreateFileUseCase().call(`${databaseModel.rootDir}/${file.name}`, file.data)).map(async () =>
|
||||
(
|
||||
await new ExecProcessUseCase().call(
|
||||
`${databaseModel.rootDir}/`,
|
||||
`python3 $PYTHON_BLENDER --path '${databaseModel.rootDir}/assets/'`,
|
||||
""
|
||||
)
|
||||
).map(async () =>
|
||||
(
|
||||
await new CreateManyFolderScenario().call(
|
||||
databaseModel.rootDir,
|
||||
Object.keys(FolderStructure).map((el) => `/${el}`)
|
||||
)
|
||||
).map(() => Result.ok("file upload and save"))
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue