Skip to content

Commit

Permalink
Revert changes regarding discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpaul committed Jan 31, 2025
1 parent a1c3778 commit e292d1c
Show file tree
Hide file tree
Showing 12 changed files with 1,932 additions and 0 deletions.
36 changes: 36 additions & 0 deletions examples/others/caduceus/reduced/debug/debug_scene.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import os
import imp
import platform
from sys import argv

# STLIB IMPORT
try:
from stlib3.scene.wrapper import Wrapper
except:
raise ImportError("ModelOrderReduction plugin depend on SPLIB"\
+"Please install it : https://github.com/SofaDefrost/STLIB")

# MOR IMPORT
from mor.utility import sceneCreation as u

slash = '/'
if "Windows" in platform.platform():
slash = "\\"

# Our Original Scene IMPORT
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../caduceusNG.pyscn"
originalScene = os.path.normpath(originalScene)
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)

def createScene(rootNode):

if (len(argv) > 1):
stateFileName = str(argv[1])
else:
stateFileName="stateFile.state"
originalScene.createScene(rootNode)

pathToNode = 'Snake'

u.createDebug(rootNode,pathToNode,stateFileName)
150 changes: 150 additions & 0 deletions examples/others/caduceus/reduced/debug/stateFile.state

Large diffs are not rendered by default.

150 changes: 150 additions & 0 deletions examples/others/caduceus/reduced/debug/step2_stateFile.state

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions examples/others/hexaBeam/reduced/debug/debug_scene.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import os
import imp
import platform
from sys import argv

# STLIB IMPORT
try:
from stlib3.scene.wrapper import Wrapper
except:
raise ImportError("ModelOrderReduction plugin depend on SPLIB"\
+"Please install it : https://github.com/SofaDefrost/STLIB")

# MOR IMPORT
from mor.utility import sceneCreation as u

slash = '/'
if "Windows" in platform.platform():
slash = "\\"

# Our Original Scene IMPORT
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../hexaBeam.pyscn"
originalScene = os.path.normpath(originalScene)
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)

def createScene(rootNode):

if (len(argv) > 1):
stateFileName = str(argv[1])
else:
stateFileName="stateFile.state"
originalScene.createScene(rootNode)

pathToNode = 'M1'

u.createDebug(rootNode,pathToNode,stateFileName)
54 changes: 54 additions & 0 deletions examples/others/hexaBeam/reduced/debug/stateFile.state

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions examples/others/hexaBeam/reduced/debug/step2_stateFile.state

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions examples/softRobots/finger/reduced/debug/debug_scene.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import os
import imp
import platform
from sys import argv

# STLIB IMPORT
try:
from stlib3.scene.wrapper import Wrapper
except:
raise ImportError("ModelOrderReduction plugin depend on SPLIB"\
+"Please install it : https://github.com/SofaDefrost/STLIB")

# MOR IMPORT
from mor.utility import sceneCreation as u

slash = '/'
if "Windows" in platform.platform():
slash = "\\"

# Our Original Scene IMPORT
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../finger.pyscn"
originalScene = os.path.normpath(originalScene)
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)

def createScene(rootNode):

if (len(argv) > 1):
stateFileName = str(argv[1])
else:
stateFileName="stateFile.state"
originalScene.createScene(rootNode)

pathToNode = 'finger'

u.createDebug(rootNode,pathToNode,stateFileName)
45 changes: 45 additions & 0 deletions examples/softRobots/finger/reduced/debug/stateFile.state

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions examples/softRobots/finger/reduced/debug/step2_stateFile.state

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions examples/softRobots/sofiaLeg/reduced/debug/debug_scene.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import os
import imp
import platform
from sys import argv

# STLIB IMPORT
try:
from stlib3.scene.wrapper import Wrapper
except:
raise ImportError("ModelOrderReduction plugin depend on SPLIB"\
+"Please install it : https://github.com/SofaDefrost/STLIB")

# MOR IMPORT
from mor.utility import sceneCreation as u

slash = '/'
if "Windows" in platform.platform():
slash = "\\"

# Our Original Scene IMPORT
originalScene = os.path.dirname(os.path.abspath(__file__)) + "/../../sofiaLeg.py"
originalScene = os.path.normpath(originalScene)
originalScene = imp.load_source(originalScene.split(slash)[-1], originalScene)

def createScene(rootNode):

if (len(argv) > 1):
stateFileName = str(argv[1])
else:
stateFileName="stateFile.state"
originalScene.createScene(rootNode)

pathToNode = 'SofiaLeg'

u.createDebug(rootNode,pathToNode,stateFileName)
645 changes: 645 additions & 0 deletions examples/softRobots/sofiaLeg/reduced/debug/stateFile.state

Large diffs are not rendered by default.

645 changes: 645 additions & 0 deletions examples/softRobots/sofiaLeg/reduced/debug/step2_stateFile.state

Large diffs are not rendered by default.

0 comments on commit e292d1c

Please sign in to comment.