[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: space label code has been integrated
neat. comments follow.
Jason Bell wrote:
>
> Group,
>
> Allen Miu's space label code has been integrated into acad2ug.
> Currently, it spits label information into a *.label file in an
> obvious format.
where is the actual format documented? can any number
of label strings be included, or only two per line as
in the example below? what is the "meaning" of the
xyz coordinate -- is it the lower left of the text
box? the centroid? what about cases in which labels
are accompanied (in DXF) by line segments indicating
the label target? i'm concerned that some info may
be lost here.
>
> The question now is where REALLY to store the space label information,
> and at what point in the pipeline it should be introduced. I think
> there are 3 options:
>
>
> 1. leave the labels in a separate file
this is an OK alternative, but risks fragmentation/deassociation
of related files.
> 2. incorporate them as comments in the .ug file, and parse them out
> later in the walls program. This assumes that dejunk propagates
> comments, which I think it does
this idea is not as appealing, since it relies on special
parsing hacks.
> 3. incorporate them as ug vertices, with a distinctive naming
> convention
i like this idea -- especially because vertices are real
UG primitives, so we A) reuse all the UG machinery and
B) expand the scene bbox with any defined vertices.
>
> For example, each line in the .label file looks similar to this:
>
> 255.000000 590.846000 0.000000 "251" "OFF"
>
> Which could be translated into a unigrafix vertex like this:
>
> v @251@OFF 255.000 590.846 0.000;
>
> ug2iv would read all vectors with an ID starting with @, and make an
> iv label with the appropriate text.
good. actually we need not hack ug2iv; couldn't we write
a special-purpose program that calls the ug parser, then
"picks out" the specially-named vertices and processes them?
>
> The code's pretty flexible, so let me know what you'd like to see.
>
> -JMB
>
let's talk about this more when sean's back.