Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to divide a line into three unequal segments

Status
Not open for further replies.

alinalin

Mechanical
Nov 27, 2005
36

I try to divide a line into three unequal segments. The ratio is 0.1, 0.8, 0.1. Is there any way of doing it in one command instead of dividing the line by two times. New lines after the old line is divided.

Since I have to perform this operation on many lines, it will greatly simplify my model construction.

Thanks in advance.
 
Replies continue below

Recommended for you

I am pretty sure that there isn't a command to do this. However, why not just write a macro? Or if you are working in APDL, a *do loop or copying and pasting the commands even...
 


Thank you for the reply.
I don't know how to write a macro for this. I use APDL. Everytime I divide a line into two lines, the new line will be given a new number. It is not possible to get the line No of many lines. I can not get the line number to write APDL code. "*do loop" is not working for this.
 
If you use *get, you can save the highest line number as a parameter, which will correspond to the line created by the ldiv command. I don't know the exact details of your problem, but I am pretty sure that using the *get command in a do loop with ldiv you can automate your line division.
 
Use

lsel,none
lsel,s,[original line]
ldiv...
L1=lsnext(0)
L2=lsnext(L1)

and then you know the line numbers of the new lines.
 
Slumdogengineer and eelco71,
thank you for the reply.

Actually, I have more than one hundred lines to divide to three segments. If I don't change the number of the original line, I will get a new number of the new line. Then, I can divide the new line into two.

What does "L1=lsnext(0)" mean? Is there any way I can assign new numbers to the lines after division?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor