Can't set Hole fill mode in inspector with mmapi.

Can't set Hole fill mode in inspector with mmapi.

eliot543
Contributor Contributor
950 Views
2 Replies
Message 1 of 3

Can't set Hole fill mode in inspector with mmapi.

eliot543
Contributor
Contributor

I can't set hole fill mode in inspector tool trough mmapi, in StoredCommands.h it shows that to change hole fill mode to minimall fill "replaceType" needs to be changed to 0, it doesn't show values for each mode in inspector description but I found it in erase, there is replaceType: integer values: MinimalFill = 0, FlatRefinedMesh = 1, MVCPlanarDeformation = 2 I assumed I can use them the same in inspector. Setting AppendToolParameterCommand("replaceType", 0) does nothing.

 

Appreciate any help.

0 Likes
Accepted solutions (1)
951 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

It's just an issue of UI updating:

 

 

 

mm.begin_tool(remote, 'inspector')
mm.set_toolparam(remote, 'replaceType', 2 ) # 0=MinimalFill, 1=FlatFill, 2= SmoothFill

 

 

works, but the dropdown isn't updated. So if you do a AutoRepairAll or click a marker it will be filled smooth while the dropdown still shows default FlatFill. Try it ... 

As soon as you pull the SmallThresh slider it is updated correctly.

Just in case you want a correct UI for user actions you might fix this update issue via code to update the dropdown doing the same:

 

 

mm.begin_tool(remote, 'inspector')
mm.set_toolparam(remote, 'replaceType', 2 ) # 0=MinimalFill, 1=FlatFill, 2= SmoothFill
#cur_val = mm.get_toolparam(remote, 'smallComponentThreshold') # store current value if needed
mm.set_toolparam(remote, 'smallComponentThreshold', 0) # change the slider to zero
#mm.set_toolparam(remote, 'smallComponentThreshold', cur_val) # reset it to current value if needed

 

 

 

Message 3 of 3

eliot543
Contributor
Contributor

Appreciate the help.

0 Likes