Failure to perform boolean difference operation

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

I am trying to perform a simple boolean operation, subtracting a small sphere (radius 0.1131) from a large sphere (radius 0.5). I am using a script to create the two spheres:

 

*settopologydisplaytype(1)

*createmark(materials,1)

*clearmark(materials,1)

*collectorcreateonly(components,'point','',3)

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'point'

*materialupdate(components,1,'')

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'point'

*clearmark(components,1)

*createmark(properties,1)

*clearmark(properties,1)

*createmark(materials,1)

*clearmark(materials,1)

*createmark(elements,1)

*clearmark(elements,1)

*createnode(0.0,0.0,0.0,0,0,0)

*collectorcreateonly(components,'ball','',3)

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'ball'

*materialupdate(components,1,'')

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'ball'

*clearmark(components,1)

*createmark(properties,1)

*clearmark(properties,1)

*createmark(materials,1)

*clearmark(materials,1)

*createmark(elements,1)

*clearmark(elements,1)

*solidspherefull(0.0,0.0,0.0,0.5)

*collectorcreateonly(components,'sphere_140','',3)

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'sphere_140'

*materialupdate(components,1,'')

*createmark(components,1)

*clearmark(components,1)

*createmark(components,1) 'sphere_140'

*clearmark(components,1)

*createmark(properties,1)

*clearmark(properties,1)

*createmark(materials,1)

*clearmark(materials,1)

*createmark(elements,1)

*clearmark(elements,1)

*solidspherefull(0,0,0,0.1131)


*createmark(components,1) 'sphere_140'

*createvector(1,1.0000,0.0000,0.0000)

*translatemark(components,1,1,-0.566639982)

*createmark(components,1) 'sphere_140'

*createvector(1,0.0000,1.0000,0.0000)

*translatemark(components,1,1,-0.179599557)

*createmark(components,1) 'sphere_140'

*createvector(1,0.0000,0.0000,1.0000)

*translatemark(components,1,1,0.109171287)

*retainmarkselections(1)

*currentcollector(components,'ball')

*retainmarkselections(0)

 

The two spheres as shown in the image attached intersect each other. However when I try to perform a boolean difference (removing the small sphere from the large one) the operation ends up just deleting the small sphere without subtracting it from the large sphere. Any idea what is wrong? 

<?xml version="1.0" encoding="UTF-8"?>post-32790-0-53520900-1409976147_thumb.p

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    Hi,

     

    Remove operation involves removing coincident pieces of solids from other solids.  For example, a cylinder partially buried in another solid can be removed in such a way that it leaves a cylindrical recess in the other solid.

     

    if you need the effect as shown in the picture below, use Union.

     

     

    <?xml version="1.0" encoding="UTF-8"?>post-7616-0-77563800-1410157744_thumb.jp

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    I want to perform a difference operation A-B, not an union. In this case A is the big sphere and B is the small sphere. The small sphere definitely penetrates into the large sphere so the difference operation should work and produce a dimple like shown in the picture (the small sphere in the picture was mirror in X, instead of -0.566639982 I changed it to 0.566639982). Why does the boolean operation fail though? 

    <?xml version="1.0" encoding="UTF-8"?>post-32790-0-34794100-1410184661_thumb.p

  • Rahul_P1
    Rahul_P1
    Altair Employee
    edited September 2014

    nikosb

     

    Please try after deleting the files below, also let me know if you tried the other boolean options with expected results. 

     

    <?xml version="1.0" encoding="UTF-8"?>post-4438-0-68413000-1410192173_thumb.jp

     

    you can also send me the file using the dropbox below so I can review as well. 

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    I have HyperMesh 11.0 installed on Windows XP. I don't see any of the folders that you specify. 

     

    When you run the above script and perform the boolean difference does it give you a dimple?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2014

    Nikosb,

     

    can you include the command *boolean_merge_solids in your script and run again?