Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi !
I see that after a split operation the body material is lost, it take the material of the component. So I want to force the body material but it doesn't work (the body appear with the component material not with my material).
parent_material = comp.material
try:
#Create SplitBodyFeatureInput
splitBodyFeats = rootComp.features.splitBodyFeatures
splitBodyInput = splitBodyFeats.createInput(body, waterPlan, True) #1: body to be split, 2: SplittingTool, 3:SplittingToolExtended
splitBodyInput.baseFeature = baseFeat
# Create split body feature
splitBodyFeats.add(splitBodyInput)
# on supprime le plus haut des 2 composants sortant
i = CutBody
Z0 = baseFeat.bodies.item(i).physicalProperties.centerOfMass.z
Z1 = baseFeat.bodies.item(i+1).physicalProperties.centerOfMass.z
# I keep only one body
if Z0 < Z1:
# material assign doesn't work...
# The property is at the right material (when printed) but in fusion the material is overwrited by the component material
baseFeat.bodies.item(i).material = parent_material
baseFeat.bodies.item(i+1).deleteMe()
Did someone know why ?
Thank you
Solved! Go to Solution.