xmakemol-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XMakemol-discuss] Manual adjustment of bounding box


From: Matt Hodges
Subject: Re: [XMakemol-discuss] Manual adjustment of bounding box
Date: Wed, 31 Mar 2004 11:58:45 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux)

>>>>> Wolfram Quester writes:

 > The first attached patch (xmakemol-5.12.small.changes.diff) contains
 > some small cleanups to get rid of these.
 > It doesn't tackle the following:
 > gcc -DHAVE_CONFIG_H -I. -I. -I.   -I/usr/X11R6/include     -Wall -g -O2  
 > -I/usr/X11R6/include -DELEMENTS=\"/usr/local/share/xmakemol/elements\" -c 
 > file.c
 > file.c: In function `open_file':
 > file.c:1355: warning: char format, different type arg (arg 4)

 > But this is the only warning that remains. Then I fixed a typo in
 > the man-page stating -G switches GL rendering on. I also replaced -
 > with \- to get a proper representation in UTF-8 terminals.

I'll have a look at these. (I fixed the one you didn't tackle.)

 > The second patch tries to add the feature to edit the bbox
 > manually. It should be applied after the first one, but it should
 > also apply to a clean 5.12-tree with some offset.

Thanks for this. Customization of the bounding box is a useful
feature.

 > It has one big bug, which makes it rather unusable and I'm not sure
 > how to handle it: You can't do anything with it when "Rotate about
 > local COM" is on. Everything works well if one uses "Rotate about
 > origin".

It also doesn't work for translations.
 
 > I tried to be as little invasive as poosible, but every solution I
 > can think of for this problem is quite big. One would be to treat
 > every corner of the bbox like an atom. But I guess I've just missed
 > something obvious. Perhaps you have a hint which line I have to
 > change to resolve this issue.

Doesn't the existing code do something like this anyway? The bounding
box is eight vectors in the local axis frame, and these are then
transformed into the fixed axis frame. Would it be easier if your
dialog just represented differences from the default values?

 > To summarize:
 > - The patch adds a menu entry "Edit -> Bounding Box" which allows to
 >   choose if the bounding box is calculated automatically or by hand. You
 >   can enter the box coordinates here. The manual bbox can be initialized
 >   from the automatical calculation.

This is fine.

 > - The thing is only functional when we rotate about the origin. Then it
 >   is also possible to use center/original orientation/original position
 >   from the track menu.
 > - It does not play together with the new scaling and the reflect and
 >   invert items in the track menu because this is fast done after the
 >   other big problem is solved.

Can you try the attached patch? Have a look at the changes relative to
what you sent, and see if they make sense. I think it now works as
expected (i.e., for any translations/rotations).

 > - It would be nice if the coordinates of the bounding box could be read
 >   from the .xyz file.

Agreed. I would also like the possibility of the bounding box being
specified by an origin and three cell vectors that are not necessarily
orthogonal. Some discussion is needed here.

 > - I'll take care about these two if the rotation about local COM is
 >   fixed.

I think it is fixed.

Matt

Attachment: xmakemol-5.12.bbox2.diff
Description: Bounding box patch for XMakemol.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]