High priority Setting Angle

This topic has been viewed 5032 times and has 3 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
anandunadkat
Posts: 17
Joined: Tue Jan 15, 2013 3:22 pm

Setting Angle

Post by anandunadkat »

Hi, when i add object to my plan, the angle is not correct, so i try rotate it manually and see what angle figure i get. But when i try input that same angle into the code, and then run it, it wont be displayed with the same angle. Could anyone help me with of to set the rotation of an object correctly in java.

Code: Select all

		furniture = new HomePieceOfFurniture(catalog.getCategory(7).getPieceOfFurniture(18));
		home.addPieceOfFurniture(furniture);
		furniture.setAngle(90); //This wont be 90 when i run the code, it will be different!
		furniture.setElevation(80);
		furniture.setX(bathroomLength- furniture.getDepth()/2 + 4);
		furniture.setY(new Float(bathroomLength - bathroomLength/1.19));
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Setting Angle

Post by Puybaret »

The angle is in radians.
Emmanuel Puybaret, Sweet Home 3D creator
anandunadkat
Posts: 17
Joined: Tue Jan 15, 2013 3:22 pm

Re: Setting Angle

Post by anandunadkat »

Thank you for your help, and what about X and Y to set an object.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Setting Angle

Post by Puybaret »

All dimensions in the model are in centimeters
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest