Class HomeDoorOrWindow
Extends
HomePieceOfFurniture.
Defined in: SweetHome3D.js.
Constructor Attributes  Constructor Name and Description 

HomeDoorOrWindow(doorOrWindow)
Creates a home door or window from an existing one.

Method Attributes  Method Name and Description 

clone()
Returns a clone of this door or window.


Returns the shape used to cut out walls that intersect this new door or window.


Returns a copy of the sashes attached to this door or window.


Returns the distance between the back side of this door or window and the wall where it's located.


Returns the height of the wall part in which this door or window should be placed.


Returns the distance between the left side of this door or window and the wall part where it should be placed.


Returns the thickness of the wall in which this door or window should be placed.


Returns the distance between the left side of this door or window and the wall part where it should be placed.


Returns the width of the wall part in which this door or window should be placed.


Returns
true if the location and the size of this door or window
were bound to a wall, last time they were updated. 

Returns always
true . 

Returns
true if this door or window should cut out the both sides
of the walls it intersects, even if its front or back side are within the wall thickness. 

Returns
false if the width and depth of the new door or window may
not be changed independently from each other. 

setAngle(angle)
Sets the angle of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the angle changed.


setBoundToWall(boundToWall)
Sets whether the location and the size of this door or window
were bound to a wall, last time they were updated.


setDepth(depth)
Sets the depth of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the depth changed.


setSashes(sashes)
Sets the sashes attached to this door or window.


setWallDistance(wallDistance)
Sets the distance between the back side of this door or window and the wall where it's located.


setWallHeight(wallHeight)
Sets the height of the wall part in which this door or window should be placed.


setWallLeft(wallLeft)
Sets the distance between the left side of this door or window and the wall part where it should be placed.


setWallThickness(wallThickness)
Sets the thickness of the wall in which this door or window should be placed.


setWallTop(wallTop)
Sets the distance between the top side of this door or window and the wall part where it should be placed.


setWallWidth(wallWidth)
Sets the width of the wall part in which this door or window should be placed.


setX(x)
Sets the abscissa of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the abscissa changed.


setY(y)
Sets the ordinate of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the ordinate changed.

 Methods borrowed from class HomePieceOfFurniture:
 addPropertyChangeListener, containsPoint, getAngle, getCatalogId, getColor, getCreator, getCurrency, getDepth, getDepthInPlan, getDescription, getDropOnTopElevation, getElevation, getGroundElevation, getHeight, getHeightInPlan, getIcon, getInformation, getLevel, getModel, getModelMaterials, getModelRotation, getModelSize, getModelTransformations, getName, getNameAngle, getNameStyle, getNameXOffset, getNameYOffset, getPitch, getPlanIcon, getPoints, getPrice, getPriceValueAddedTaxIncluded, getRoll, getShininess, getStaircaseCutOutShape, getTexture, getValueAddedTax, getValueAddedTaxPercentage, getWidth, getWidthInPlan, getX, getY, intersectsRectangle, isAtLevel, isBackFaceShown, isBottomLeftPointAt, isBottomRightPointAt, isDeformable, isHorizontallyRotatable, isHorizontallyRotated, isModelCenteredAtOrigin, isModelMirrored, isMovable, isNameCenterPointAt, isNameVisible, isParallelToWall, isPointAt, isResizable, isTexturable, isTopLeftPointAt, isTopRightPointAt, isVisible, move, removePropertyChangeListener, scale, setColor, setCurrency, setDepthInPlan, setDescription, setElevation, setHeight, setHeightInPlan, setLevel, setModelCenteredAtOrigin, setModelMaterials, setModelMirrored, setModelSize, setModelTransformations, setMovable, setName, setNameAngle, setNameStyle, setNameVisible, setNameXOffset, setNameYOffset, setPitch, setPrice, setRoll, setShininess, setTexture, setValueAddedTaxPercentage, setVisible, setWidth, setWidthInPlan
 Methods borrowed from class HomeObject:
 getProperty, getPropertyNames, setProperty
Class Detail
HomeDoorOrWindow(doorOrWindow)
Creates a home door or window from an existing one.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
 Parameters:
 {Object} doorOrWindow
 the door or window from which data are copied
Method Detail
{HomeDoorOrWindow}
clone()
Returns a clone of this door or window.
 Returns:
 {HomeDoorOrWindow}
{string}
getCutOutShape()
Returns the shape used to cut out walls that intersect this new door or window.
 Returns:
 {string}
{Array}
getSashes()
Returns a copy of the sashes attached to this door or window.
If no sash is defined an empty array is returned.
 Returns:
 {Array}
{number}
getWallDistance()
Returns the distance between the back side of this door or window and the wall where it's located.
 Returns:
 {number} a distance in percentage of the depth of the door or the window.
{number}
getWallHeight()
Returns the height of the wall part in which this door or window should be placed.
 Returns:
 {number} a value in percentage of the height of the door or the window.
{number}
getWallLeft()
Returns the distance between the left side of this door or window and the wall part where it should be placed.
 Returns:
 {number} a distance in percentage of the width of the door or the window.
{number}
getWallThickness()
Returns the thickness of the wall in which this door or window should be placed.
 Returns:
 {number} a value in percentage of the depth of the door or the window.
{number}
getWallTop()
Returns the distance between the left side of this door or window and the wall part where it should be placed.
 Returns:
 {number} a distance in percentage of the height of the door or the window.
{number}
getWallWidth()
Returns the width of the wall part in which this door or window should be placed.
 Returns:
 {number} a value in percentage of the width of the door or the window.
{boolean}
isBoundToWall()
Returns
true
if the location and the size of this door or window
were bound to a wall, last time they were updated.
 Returns:
 {boolean}
{boolean}
isDoorOrWindow()
Returns always
true
.
 Returns:
 {boolean}
{boolean}
isWallCutOutOnBothSides()
Returns
true
if this door or window should cut out the both sides
of the walls it intersects, even if its front or back side are within the wall thickness.
 Returns:
 {boolean}
{boolean}
isWidthDepthDeformable()
Returns
false
if the width and depth of the new door or window may
not be changed independently from each other. When false
, this door or window
will also make a hole in the wall when it's placed whatever its depth if its
{@link #isBoundToWall() bouldToWall} flag is true
.
 Returns:
 {boolean}
setAngle(angle)
Sets the angle of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the angle changed.
 Parameters:
 {number} angle
setBoundToWall(boundToWall)
Sets whether the location and the size of this door or window
were bound to a wall, last time they were updated.
 Parameters:
 {boolean} boundToWall
setDepth(depth)
Sets the depth of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the depth changed.
 Parameters:
 {number} depth
setSashes(sashes)
Sets the sashes attached to this door or window.
 Parameters:
 {Array} sashes
 sashes of this window.
setWallDistance(wallDistance)
Sets the distance between the back side of this door or window and the wall where it's located.
 Parameters:
 {number} wallDistance
 a distance in percentage of the depth of the door or the window.
setWallHeight(wallHeight)
Sets the height of the wall part in which this door or window should be placed.
 Parameters:
 {number} wallHeight
 a value in percentage of the height of the door or the window.
setWallLeft(wallLeft)
Sets the distance between the left side of this door or window and the wall part where it should be placed.
 Parameters:
 {number} wallLeft
 a distance in percentage of the width of the door or the window.
setWallThickness(wallThickness)
Sets the thickness of the wall in which this door or window should be placed.
 Parameters:
 {number} wallThickness
 a value in percentage of the depth of the door or the window.
setWallTop(wallTop)
Sets the distance between the top side of this door or window and the wall part where it should be placed.
 Parameters:
 {number} wallTop
 a distance in percentage of the height of the door or the window.
setWallWidth(wallWidth)
Sets the width of the wall part in which this door or window should be placed.
 Parameters:
 {number} wallWidth
 a value in percentage of the width of the door or the window.
setX(x)
Sets the abscissa of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the abscissa changed.
 Parameters:
 {number} x
setY(y)
Sets the ordinate of this door or window and
resets its {@link #isBoundToWall() boundToWall} flag if the ordinate changed.
 Parameters:
 {number} y