Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a6ff885
add folder for STLIB
bakpaul Apr 14, 2025
60352a4
Add reusable methods
bakpaul Apr 14, 2025
d024105
Add working files
bakpaul Apr 14, 2025
10082bf
Created example scenes
bakpaul Apr 14, 2025
d167479
Fix example
bakpaul Apr 14, 2025
dd9cc34
orga folders
hugtalbot Apr 14, 2025
7589706
Fix package
bakpaul Apr 14, 2025
2f844d7
bootstrap examples
bakpaul Apr 14, 2025
2c55e7d
start beginner scene
hugtalbot Apr 14, 2025
9b9e057
Move around files
bakpaul Apr 14, 2025
b989159
Move examples into SofaPython3 main example folder
bakpaul Apr 14, 2025
b42833b
Add unsaved modifications
bakpaul Apr 14, 2025
fa0bd74
reoganisation after discussion
EulalieCoevoet Apr 14, 2025
4380356
Add gemetries
bakpaul Apr 14, 2025
ba978ce
WIP FileParameters
bakpaul Apr 14, 2025
fc88100
Add beginner example
bakpaul Apr 14, 2025
7c314c6
Add unsaved changes
bakpaul Apr 14, 2025
b70a52b
Start work on visual and collision
bakpaul Apr 14, 2025
7cedc42
work on Tuesday : visual, geometry
hugtalbot Apr 15, 2025
5f183d5
add basePrefabParameters.py
hugtalbot Apr 15, 2025
97a2381
Add extracted geometry
bakpaul Apr 15, 2025
00fd16b
Fix visual example
bakpaul Apr 15, 2025
423a484
Finished collisions
bakpaul Apr 15, 2025
c97bfa3
[stlib-splib] work on prefabs: cleaning (#501)
EulalieCoevoet Jun 2, 2025
995d1b3
[stlib] adds README
EulalieCoevoet Jun 2, 2025
01531ca
[stlib] minor changes from discussion
EulalieCoevoet Jun 2, 2025
fc1404a
[splib] updates entity
EulalieCoevoet Jun 3, 2025
dd230b9
update README
hugtalbot Jun 3, 2025
57efa1d
add init in prefab
hugtalbot Jun 3, 2025
938f05b
Add first implem of entity
bakpaul Jun 3, 2025
592c13d
before the train 3/3
hugtalbot Jun 3, 2025
ca864d8
very last commit befor train
EulalieCoevoet Jun 3, 2025
1d8cdd3
WIP
bakpaul Jun 3, 2025
bacb258
Retore original. Still crash due to wrong string conversion
bakpaul Jun 3, 2025
09f45c5
[stlib] Deformable Entity (#502)
EulalieCoevoet Jun 13, 2025
d4b6042
Fix linkpath by introducing init method + make addDeformableMaterial …
bakpaul Jun 13, 2025
aad2a5e
[STLIB] Add the unified "add" in Sofa.Core.Node (#503)
damienmarchal Jul 17, 2025
1b15154
Add new tests for prefabs
bakpaul Jul 17, 2025
e2fff56
Revert modification of __genericAdd
bakpaul Jul 17, 2025
9de87d4
update addMass using elementType
hugtalbot Jul 17, 2025
75fa28f
[Prefabs] Reorder files to match concepts (#547)
bakpaul Oct 28, 2025
ae1d496
[Prefabs] cleaning to fix deformable example (#549)
EulalieCoevoet Oct 28, 2025
ac3ed74
Fix by passing state link when using other topology than edges (#550)
bakpaul Oct 28, 2025
539badc
Squashed commit of the following:
bakpaul Mar 2, 2026
ed5e019
Fix constraint solvr name
bakpaul Mar 2, 2026
0219382
Fix non working examples.
damienmarchal Mar 2, 2026
3c5d2bd
TYPO
damienmarchal Mar 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[stlib] minor changes from discussion
  • Loading branch information
EulalieCoevoet authored and bakpaul committed Oct 28, 2025
commit 01531ca5de7792e8973f23e58a0e5cd20ff127b4
13 changes: 7 additions & 6 deletions stlib/geometry/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def generateAttribute(self, parent : Geometry):
tmn = parent.addChild("TopologicalMappingNode")

#TODO: Specify somewhere in the doc that this should only be used for mapped topologies that extract parent topology surface

fromLink = parent.parents[0].parents[0].getChild(self.fromNodeName).container.linkpath
addDynamicTopology(tmn, type=self.destElementType)
if self.fromElementType == ElementType.TETRAHEDRONS:
Expand All @@ -47,13 +48,13 @@ def generateAttribute(self, parent : Geometry):

class ExtractParameters(GeometryParameters):
def __init__(self,
fromGeometry : GeometryParameters,
destElementType : ElementType,
sourceParameters : GeometryParameters,
destinationType : ElementType,
dynamicTopology = False, ):
GeometryParameters.__init__(self,
data = ExtractInternalDataProvider(destElementType = destElementType,
fromElementType = fromGeometry.elementType,
fromNodeName = fromGeometry.name),
data = ExtractInternalDataProvider(destElementType = sourceParameters,
fromElementType = destinationType,
fromNodeName = destinationType.name),
dynamicTopology = dynamicTopology,
elementType = destElementType)
elementType = destinationType)

12 changes: 9 additions & 3 deletions stlib/prefabs/collision.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@ def createScene(root):

# Create a visual from a mesh file
params = Collision.getParameters()
params.group = 1
params.geometry = FileParameters(filename="mesh/cube.obj")
# Expert parameters
params.kwargs = {
"contactStiffness": 100.0,
"contactFriction": 0.5
"TriangleCollisionModel":{"contactStiffness": 100.0, "contactFriction": 0.5}
}
root.add(Collision, params)
collision = root.add(Collision, params)

# OR set the parameters post creation
collision.TriangleCollisionModel.contactStiffness = 100.0
collision.TriangleCollisionModel.contactFriction = 0.5
collision.TriangleCollisionModel.set(contactStiffness=100.0, contactFriction=0.5) # we have information of what is possible
collision.TriangleCollisionModel.set({"contactStiffness": 100.0, "contactFriction": 0.5}) # we can do n'importe quoi
7 changes: 3 additions & 4 deletions stlib/prefabs/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ def createScene(root):
params.geometry = FileParameters(filename="mesh/cube.obj")
root.add(Visual, params)


# Create a visual from a mesh file
# # Create a visual from a node
# params = Visual.getParameters()
# params.name = "ExtractedVisual"
# params.geometry = ExtractParameters(fromGeometry=FileParameters(filename="mesh/cube.vtk"),
# destElementType=ElementType.TRIANGLES)
# params.geometry = ExtractParameters(sourceParameters=FileParameters(filename="mesh/cube.vtk"),
# destinationType=ElementType.TRIANGLES)
# root.add(Visual, params)