change feature angle for the function *appendmark

Joachim_B
Joachim_B Altair Community Member
edited March 5 in Community Q&A

Hello.

I have created a TCL script where I split shell elements into different components. The script workflow is as follows:

  1. I specify a point and determine the ID of the node closest to the point using hm_getclosestnode.
  2. I find the elements connected to the node.
  3. Using the function *appendmark elems 1 "by face", I extend the selection to all elements representing the surface.
  4. I move the elements to a new component.

The script works. However, I have the problem that the function *appendmark uses a too large feature angle. According to the manual, I understood that the function *setoption feature_angle=10 should change the angle, but I couldn't notice any change in behavior.

Therefore, my question is, where is the error, or which function do I need to use to change the angle? Thanks in advance for the help.

Here is a sample of my current script.

*setoption feature_angle=10
*createmark elems 1 "by comp" ^faces
set id1 [hm_getclosestnode 0 162 -1510 1]
*createmark nodes 1 $id1
*findmark nodes 1 1 0 elems 0 1
eval hm_markremove elems 1 $solidElemIDs
*marktousermark elems 1
*createmark elems 1 "retrieve"
*appendmark elems 1 "by face"
*movemark elems 1 "inlet"

*setoption feature_angle=10

*createmark elems 1 "by comp" ^faces
set id1 [hm_getclosestnode 0 162 -1510 1]

*createmark nodes 1 $id1
*findmark nodes 1 1 0 elems 0 1
eval hm_markremove elems 1 $solidElemIDs
*marktousermark elems 1
*createmark elems 1 "retrieve"
*appendmark elems 1 "by face"
*movemark elems 1 "inlet"

Here are also 2 images for understanding.
Image 1 shows the result that my script delivers, and Image 2 shows how I would like it to be.

Best Answer

  • Fred_Juras
    Fred_Juras
    Altair Employee
    Answer ✓

    Hello Joachim,

    Your script looks correct and should work.
    Have you tried to reduce the feature angle value? Because, according to your screenshots, the tangency is preserved between the flat surface and the cylinder.
    If using a feature value of 1 or 2 doesn't have any impact, then you should maybe consider another approach ⇒ the "on plane" method from *createmark for instance.

    Regards,
    Fred JURAS.

Answers

  • Fred_Juras
    Fred_Juras
    Altair Employee
    Answer ✓

    Hello Joachim,

    Your script looks correct and should work.
    Have you tried to reduce the feature angle value? Because, according to your screenshots, the tangency is preserved between the flat surface and the cylinder.
    If using a feature value of 1 or 2 doesn't have any impact, then you should maybe consider another approach ⇒ the "on plane" method from *createmark for instance.

    Regards,
    Fred JURAS.

  • Joachim_B
    Joachim_B Altair Community Member
    edited March 6

    Hello Fred.

    Okay, it apparently works after all. I took the angle of 10° because it worked with the angle selection via the GUI. I mean when I used "select elements by face" as the selection method in 3D.

    If I reduce the value to 5° in my script, it currently looks like it works.
    I will test it a bit over the next few days and get back to you if I encounter any more issues.

    Regards
    Joachim Bergmann