FreeCAD: Workbench Refactor
This commit is contained in:
parent
037827669a
commit
a58dcdafb1
386 changed files with 997 additions and 64533 deletions
18
simulation/asp/src/usecases/generate_world.py
Normal file
18
simulation/asp/src/usecases/generate_world.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import os
|
||||
from helper.fs import FS
|
||||
|
||||
|
||||
class SdfGenerateWorldUseCase:
|
||||
def call(assembly: str) -> str:
|
||||
world = FS.readFile(
|
||||
os.path.dirname(os.path.realpath(__file__)) + "/../../mocks/sdf/world.sdf"
|
||||
)
|
||||
beginWorld = world[0 : world.find("</world") - 1]
|
||||
endWorld = world[world.find("</world") - 1 : world.__len__()]
|
||||
|
||||
return beginWorld + assembly + endWorld
|
||||
|
||||
|
||||
class GeometryValidateUseCase:
|
||||
def call(geometry) -> str:
|
||||
return
|
Loading…
Add table
Add a link
Reference in a new issue