×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

how to divide a line into three unequal segments

how to divide a line into three unequal segments

how to divide a line into three unequal segments

(OP)

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.  

RE: how to divide a line into three unequal segments

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...

RE: how to divide a line into three unequal segments

(OP)


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.  

RE: how to divide a line into three unequal segments

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.

RE: how to divide a line into three unequal segments

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.

RE: how to divide a line into three unequal segments

(OP)
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?

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources