Syntax
SG=SGsample4APredator
Output Parameter
Examples
Simply type
SGsample4APredator
Copyright 2020-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)
This function, SGsample4APredator
, generates a solid geometry (SG) model for testing the Z-level of an Anycubic Predator 3D printer. The function does not take any input parameters and outputs a solid geometry object, SG
.
Parameters and Variables
Do
: A vector containing the diameters of circles used in the model, defined as [360, 260, 140, 20] mm.
Ro
: A vector of radii, calculated as half of Do
.
B
: A constant value of 5 mm, used as a border or offset.
H
: A constant height of 1.5 mm for the solid geometry.
CPL
: An empty matrix initialized to store the combined planar geometry.
Algorithm Steps
- Initialize
CPL
as an empty matrix.
- Loop through each radius in
Ro
:
- For each radius, append a circle with that radius to
CPL
.
- Append a NaN separator to
CPL
.
- Append a circle with a reduced radius (
Ro(i) - B
) to CPL
.
- Append another NaN separator.
- Remove the last NaN separator from
CPL
.
- Union the
CPL
with a square of size max(Do) - B/2
and thickness B
.
- Union the
CPL
with another square of thickness B
and size max(Do) - B/2
.
- Union the
CPL
with a circle of the smallest radius in Ro
.
- Create the solid geometry
SG
from the combined planar geometry CPL
with height H
.
Output and Visualization
- If no output is requested (
nargout == 0
), the function will:
- Plot the geometry using
SGfigure
and CPLplot
.
- Display the solid geometry with
SGplotalpha
.
- Write the solid geometry to STL files named 'SGsample4APredator' and 'AP_Level_Test-'.
Algorithm explaination created using ChatGPT on 2025-08-19 00:40. (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