tangent coordinate..
Hello Everyone!
Recently I have come across with an HM API i.e. '*tangentbetweennodeandline'.
Syntax for the HM API --- *tangentbetweennodeandline is 'node id line id checkpoints lineselected'
for using this command it asks us NODE id and a LINE id, also the checkpoint where I generally use '20' for better accuracy.
But the only thing which I don't get is what to use in 'lineselected'
When I use the same option through GUI I was able to select the required line, but when I want to use the above mentioned HM API it is requiring me to hardcode the line number beforehand which I'm not sure of the correct line.
So I would be glad if anyone can help me with this specific problem of selection of lineselected.
Thanks in advance.
Regards,
Brahmadev.
Answers
-
example with a circle and a external node, there are 2 tangent lines => so lineselected is 0 or 1 for the first and second line
you have to identify the line id, instead of using hardcode
0 -
Thanks for responding Tinh.
My main problem here is to identifying that line id of the available tangents.
So what I was doing for my present script is, I'm manually selecting the tangent line in GUI mode and checking the tangent line ID in the .CMF file.
But by following this approach I can use the script for this specific single model itself. So, to make my script more generalized I want to know a method for detecting the available tangent line ids from the script end itself.
I hope you understand my exact problem.
Regards,
Brahmadev.
0 -
So generally, which tangent line do you want?
Please show an image what you got and what you want
0 -
Hello Tihn,
Sorry for the late response. Please find the attachment, wherein i'm facing the issue.
The reason for the curve going out of the channel is because of wrong selection of the 'lineselected' value. Is there is any way to know which line ID I need to select before drawing a tangent .
Thanks in advance.
Regards,
Brahmadev.
<?xml version="1.0" encoding="UTF-8"?>
0 -
Don't understand at all.
Please show your script.
0 -
Image -1 :: is the input I have
Image -2 :: my expectation of output
Image -3 :: the output from the script.
I cannot share the script, but the problem where I'm facing the issue at the below given code.
the below line is kept in a loop where the 'node_ID' and the ''line_ID' are the variables
> *tangentbetweennodeandline node_ID line_ID 20 0 <
But at the location (in image - 3 ) where line is coming out the U-Channel and creating the line. To avoid that i need to use the below line of code.
> *tangentbetweennodeandline node_ID line_ID 20 1 <
So, at times I need to use 0 and at times I need to use 1 for the value in lineselected. Is, there any way to decide, which tangent line ID I should take so that line created is inside the channel.
0 -
In the above image you can see that two tangents were possible for a node and a line id . If I had to use this option through GUI, I was given an option to select the required tangent line.
But where as, if I had to draw the tangents for the given circle through script do I need to know the tanglent line id before the runnign the script ?
If yes how to know the line ID of the possible tangent line.
0 -
I think it depends on position of node and direction of circle. There is no way to decide. So i think creating both lines and compare positions with the surf, this is not simple.
Totally, i think you are going with wrong approach. Try again from beginning.
0 -
Altair Forum User said:
I think it depends on position of node and direction of circle. There is no way to decide. So i think creating both lines and compare positions with the surf, this is not simple.
Totally, i think you are going with wrong approach. Try again from beginning.
Ok Tinh.
BTW I got another approach for solving my problem.
Thanks for your time and help.
Regards,
Brahamdev.
0