Hi everybody,

i try to write an application that uses box-like shapes to construct modular products 
(e.g. add boxes in different directions relatively to other boxes to create a rough 
furniture construction).
Each of these boxes can have other shapes internally (surrounded by the box). Each 
time I add a new "internal shape" to a box, i want to resize this box in atleast one 
direction.
Scaling is not an option, because i don't want the internal objects to be scaled also.
An alternative to me, would be to replace this box with a new one with the correct 
dimensions.

I have the following problems:
1.
I cannot retrieve the current size of my box (dimensions).
I try with the bounding box, but it always returns the same values:
(-1,-1,-1),(1,1,1). Is there something i should do during the creation of the box to 
set the bounds ?
If the AUTO_COMPUTE_BOUNDS is on, shouldn't this happen automatically ?


2.
Imagine that i want to construct a shape that represents the sceleton of a box (beams 
connected to the corners of the box), i.e. a something that looks like the wireframe 
representation of the box. Each of these beams has a specific length that corresponds 
to one of the box dimensions.
For an example let us assume that the box dimensions are 1x1x1.
In this case all beams are of length=1.
When i try to position those beams in space, i use different transrorms for each beam.
To position the front-top beam, the transform's translation should be:
(0,1,0).
To position the front-bottom beam, the transform's translation should be:
(0,0,0).
..... ( same pattern for all other beams) .....
example code:
Beam3D bm_1 = new Beam3D(boxLength);
bm_1.construct();
TransformGroup tg_1 = new TransformGroup();
//tg_1.setBounds(new BoundingBox(new Point3d(0,0,0),new Point3d(1,1,1)) );
Transform3D trans_1 = new Transform3D();
trans_1.set(new Vector3f(0f,0f,boxHeight) );
tg_1.setTransform(trans_1);

Beam3D bm_2 = new Beam3D(boxLength);
bm_2.construct();
TransformGroup tg_2 = new TransformGroup();
Transform3D trans_2 = new Transform3D();
trans_2.setTranslation(new Vector3f(0f,boxWidth,boxHeight) );
tg_2.setTransform(trans_2);

.................

I have 2 versions of beam construction, one from an obj file and one from geometry 
array.
With the geometry array positioning is ok.
But when reading from the file what i get is different from what i expected.
First thing to notice is that the beams seam to be translated as if the anchor point 
is on their center and not at the local (0,0,0) point (i construct the beams like that 
in my cad tool).

Could any one point to me any possible solution for the above ?
i.e.
 How can i get the size of a shape (or even better a group) ?
 How can i use a point different than the center of a shape or transformgroup in order 
to position it on a scene ?

I just hope i didn't confuse everybody.
Regards to all

Loukas

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to