POV-Ray : Newsgroups : povray.general : printing object's identifier : Re: printing object's identifier Server Time
5 May 2024 10:12:11 EDT (-0400)
  Re: printing object's identifier  
From: clipka
Date: 16 Mar 2016 21:42:09
Message: <56ea0b71$1@news.povray.org>
Am 17.03.2016 um 01:31 schrieb jr:
> hi clipka,
> 
> On 16/03/2016 23:50, clipka wrote:
> 
> thanks for swift response.  this approach led to a different problem
> (see below).  the macro is stored in its own file and meant to be
> general purpose (to trace the outline of whichever object was passed via
> ObjId), and I need both the object's name (for feedback and to populate
> a field in the output), and the object to trace.  I'm now thinking,
> given the below, it might be easier/better to supply both the name and
> the identifier as separate arguments, do you concur?
> 
> jr.
> 
> 
> #declare Tobj = torus { ... };
> object { Tobj }
> mymacro("Tobj")
> 
> #debug concat("id: ", ObjId)
> 
> Parse_String(ObjId)
> #local bbox_min = min_extent(ObjId)
> 
> POV now fails on the min_extent since I'm passing it a string..

You need to use

#local bbox_min = min_extent( Parse_String(ObjId) );

But yes, it would probably be easier to have two separate parameters,
one specifying the object and one specifying a string to use as a "name"
for that object.


Post a reply to this message

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