POV-Ray : Newsgroups : povray.general : selecting several thousand lines in pov file Server Time
4 Nov 2024 23:19:59 EST (-0500)
  selecting several thousand lines in pov file (Message 1 to 10 of 35)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Steve Shelby
Subject: selecting several thousand lines in pov file
Date: 16 Sep 2003 09:20:26
Message: <3f670e1a$1@news.povray.org>
Hi,
Is there an easier way to do this? I have about 9,000 lines, one of several
mesh2 objects, in a pov file, that I want to select in order to copy and
paste to another pov file, which also contains several mesh2 objects. The
only would I know to do this is to start selecting and scroll, and scroll,
and scroll.......and scroll until an eternity later I finally have the whole
thing selected. It seems like one ought to be able to tell Povray to "select
from line 8605 to line 17361" and it would be done, but I can't find any way
to do that, nor can I find anything in the documentation about it. Am I
stuck doing it the hard way?
Steve Shelby


Post a reply to this message

From: Steve Martin
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 09:29:38
Message: <3f671042@news.povray.org>
Steve Shelby wrote:
> Hi,
> Is there an easier way to do this? I have about 9,000 lines, one of several
> mesh2 objects, in a pov file, that I want to select in order to copy and
> paste to another pov file, which also contains several mesh2 objects. The
> only would I know to do this is to start selecting and scroll, and scroll,
> and scroll.......and scroll until an eternity later I finally have the whole
> thing selected.

If I'm understanding what you're asking, how about this? Select the first
line, then page/scroll down until you find the last line, and SHIFT-click on
the last line. This should select everything between the two points.

Hope this helps.


Post a reply to this message

From: Steve Shelby
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 09:34:11
Message: <3f671153$1@news.povray.org>
Steve,
That's what I'm doing now. The problem is that it takes 5-10 minutes to
scroll down that many lines.
Steve

"Steve Martin" <ecp### [at] bellsouthnet> wrote in message
news:3f671042@news.povray.org...
> If I'm understanding what you're asking, how about this? Select the first
> line, then page/scroll down until you find the last line, and SHIFT-click
on
> the last line. This should select everything between the two points.
>
> Hope this helps.
>


Post a reply to this message

From: ABX
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 09:41:49
Message: <144emv44qg57n5inl0fjpkc6f52le1acl5@4ax.com>
On Tue, 16 Sep 2003 08:20:24 -0500, "Steve Shelby" <ssh### [at] rexnetnet> wrote:
> Hi,
> Is there an easier way to do this? I have about 9,000 lines, one of several
> mesh2 objects, in a pov file, that I want to select in order to copy and
> paste to another pov file, which also contains several mesh2 objects. The
> only would I know to do this is to start selecting and scroll, and scroll,
> and scroll.......and scroll until an eternity later I finally have the whole
> thing selected. It seems like one ought to be able to tell Povray to "select
> from line 8605 to line 17361" and it would be done, but I can't find any way
> to do that, nor can I find anything in the documentation about it. Am I
> stuck doing it the hard way?

You can do this in general way applying method like in... CSG object.
Applying intersection can be replaced with applying difference if you
understand what I mean :-)

BTW: what about asking gui specific question in gui specific group ?

ABX


Post a reply to this message

From: Warp
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 10:39:11
Message: <3f67208f@news.povray.org>
Steve Shelby <ssh### [at] rexnetnet> wrote:
> That's what I'm doing now. The problem is that it takes 5-10 minutes to
> scroll down that many lines.

  If you grab the scrollbar at the right and drag it down, it shouldn't
take too much. That's what the scrollbar is for.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jim Charter
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 11:37:02
Message: <3f672e1e$1@news.povray.org>
Warp wrote:
> Steve Shelby <ssh### [at] rexnetnet> wrote:
> 
>>That's what I'm doing now. The problem is that it takes 5-10 minutes to
>>scroll down that many lines.
> 
> 
>   If you grab the scrollbar at the right and drag it down, it shouldn't
> take too much. That's what the scrollbar is for.
> 
If the file is very large it is difficlt to do this accurately.  One 
thing I try is to devise a strategy where I select off the topmost block
and either delete it or copy it.  That way I can use the Find to get to 
the middle point, mark it then 'scroll bar' quickly to the top and Shift 
click there to select the block.


Post a reply to this message

From: ABX
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 12:25:29
Message: <jrdemv8brfoighaectslio426naeab03e9@4ax.com>
On Tue, 16 Sep 2003 15:40:25 +0200, ABX <abx### [at] abxartpl> wrote:
> You can do this in general way applying method like in... CSG object.
> Applying intersection can be replaced with applying difference if you
> understand what I mean :-)

In case you didn't here is sequence of keys needed to cut lines from 8605 to
17361 within POV-Ray for Windows editor assuming your file is open and active

Ctrl+G
      8
       6
        0
         5
          Enter
               Shift+Ctrl+Home
                              Del
                                 Ctrl+G
                                       8
                                        7
                                         5
                                          6
                                           Enter
                                                Shift+Ctrl+End
                                                              Del
where 8756 is 17361-8605 :-)

ABX


Post a reply to this message

From: Tim Cook
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 12:54:59
Message: <3f674063$1@news.povray.org>
Wouldn't it be easier to just put the several thousand lines
in a separate .inc file?  Then you only need to move one line
in the .pov file. ;)


Post a reply to this message

From: Jerry
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 13:20:31
Message: <jerry-C52202.10202816092003@netplex.aussie.org>
In article <3f670e1a$1@news.povray.org>,
 "Steve Shelby" <ssh### [at] rexnetnet> wrote:

>Hi,
>Is there an easier way to do this? I have about 9,000 lines, one of several
>mesh2 objects, in a pov file, that I want to select in order to copy and
>paste to another pov file, which also contains several mesh2 objects. The
>only would I know to do this is to start selecting and scroll, and scroll,
>and scroll.......and scroll until an eternity later I finally have the whole
>thing selected. It seems like one ought to be able to tell Povray to "select
>from line 8605 to line 17361" and it would be done, but I can't find any way
>to do that, nor can I find anything in the documentation about it. Am I
>stuck doing it the hard way?
>Steve Shelby

#!/usr/bin/perl

while ($ARGV[0] =~ /^-(start|end)=([0-9]+)/) {
   $cmd = $1;
   $number = $2;
   if ($cmd eq 'start') {
      $startline = $number;
   } else {
      $endline = $number;
   }
   shift;
}

while (<>) {
   $line++;
   print if ($line >= $startline && ($endline<= 0 || $line <= $endline));
}

Save it as "clip" and ensure however you do so for your OS that it is 
executable.

Use as (on Unix)

clip -start=xx -end=xx filename

On Mac OS X, for example, I might use:

clip -start=8605 -end=17361 meshes.pov | pbcopy

And then I could paste those lines into another document.

On Linux, I might use:

clip -start=8605 -end=17361 meshes.pov > wantedmeshes.pov

to put those lines into a file called "wantedmeshes.pov"

I don't know the syntax for using perl on Windows, but it would probably 
be similar.

Leave out -start to start at the beginning, and leave out -end to go to 
the end. You can do multiple files, but it will start counting from the 
first file and continue on counting through subsequent files, which 
probably isn't generally what you want.

Jerry
-- 
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.ItIsntMurder.com/)


Post a reply to this message

From: Gilles Tran
Subject: Re: selecting several thousand lines in pov file
Date: 16 Sep 2003 14:33:47
Message: <3f67578b@news.povray.org>

news:3f670e1a$1@news.povray.org...
> to do that, nor can I find anything in the documentation about it. Am I
> stuck doing it the hard way?

Copy the file into a spreadsheet (e.g. Excel), do the job there and copy the
result back.
Actually I often use Excel for this sort of job.

G.


-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.