Syntax
SG=SGfurniturespacer([ddd,ope])
Input Parameter
ddd : | | [x y wall distance height]; default is [25 25 3 65 25] |
ope : | | if true; the parts are open in [x y]; default is [false false] |
Output Parameter
Examples
SGfurniturespacer([25 25 3 65 25]); % Rolf Benz Ego Sofa 2022 (Tusculum Living Room)
SGfurniturespacer([40 80 3 30],true); % Bestloft Krupp Table Slides
SGfurniturespacer([60 40 5 150 10],true) % Homery White Sofa (Tusculum Souterain)
SGfurniturespacer([45 43 3 120],true); % Rolf Benz 2002 (Klein-Tusculum)
Copyright 2023-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
The function SGfurniturespacer
is designed to create a solid geometry object that acts as a spacer to protect furniture from touching a wall. It is part of the SolidGeometry library.
Input Parameters
- ddd: A vector containing dimensions and properties of the spacer. The default is
[25 25 3 65 25]
, representing [x y wall distance height]
.
- ope: A boolean vector indicating if the parts are open in the
[x y]
directions. The default is [false false]
.
Output
- SG: The resulting solid geometry object.
Algorithm Steps
- Retrieve the input parameters
ddd
and ope
using the getfuncparams
function, with default values if not provided.
- Set a spacer length
sl
to 1 mm.
- Calculate the dimensions:
x = ddd(1) + 2 * sl
y = ddd(2) + 2 * sl
d = ddd(3)
l = ddd(4)
h = ddd(5)
- Construct a command string
str
using sprintftext
to define the base and height of the spacer.
- Create the solid geometry object
SG
using SGofCPLcommand
with the command string.
- Check the
ope
vector:
- If
ope(1)
is true, cut the end of SG
on the 'right' by d + 0.5
mm using SGcutend
.
- If
ope(2)
is true, cut the end of SG
on the 'front' by d + 0.5
mm using SGcutend
.
- If no output is requested (
nargout == 0
), perform the following:
- Display the geometry using
SGfigure
and SGplotalpha
.
- Write the geometry to an STL file named 'FWSpacer' using
SGwriteSTL
.
Algorithm explaination created using ChatGPT on 2025-08-19 07:29. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21