Syntax
SG=SGfourbarhullplate(ARCR,ARC1,ARCB,roi,[h])
Input Parameter
ARCR : | | Hull of crank movement |
ARC1 : | | Hull of swing movement |
ARCB : | | Contour to connect base points of crank and swing |
roi : | | outer and inner radius if link geoemtry |
h : | | heiht; default is [roi(1)/2] |
Output Parameter
Examples
CPLfourbarlinkagehull (60,40,100,60,'',1);
CPLfourbarlinkagehull (60,40,50,60,'',1);
[ARCR,ARC1,ARCB]=CPLfourbarlinkagehull (60,40,50,60,'',2); roi=[5 3]
SGfourbarhullplate(ARCR,ARC1,ARCB,roi);
Copyright 2019-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, SGfourbarhullplate
, is designed to compute the hull shapes of a crank and swing in a four-bar linkage system. It is part of the SolidGeometry library and was introduced in version 4.6.
Input Parameters
- ARCR: The hull of the crank movement.
- ARC1: The hull of the swing movement.
- ARCB: The contour connecting the base points of the crank and swing.
- roi: A vector containing the outer and inner radius of the link geometry.
- h: The height of the geometry, with a default value of
roi(1)/2
if not provided.
Algorithm Steps
- Determine the height
h
using the function getfuncparams
, which defaults to roi(1)/2
if not specified.
- Remove straight segments from
ARCR
, ARC1
, and ARCB
using CPLremstraightAmin
with a threshold of 1e-2
.
- Combine the hulls
ARCR
, ARC1
, and ARCB
using CPLbool
with the '+' operation to form CPLH
.
- Remove straight segments from the outer boundary of
CPLH
using CPLremstraightAmin
with a threshold of 0.1
.
- Create buffered versions of
ARCR
and ARC1
using CPLbuffer
with a negative buffer of -roi(2)
, and store them in CPLR
and CPL1
respectively.
- Fill
CPLH
with a honeycomb pattern using CPLfillHoneycomb
with parameters roi(2)/2
and 2*roi(1)
.
- Combine
CPLH
with CPLR
and CPL1
using CPLbool
with the '+' operation.
- Convert the combined contour
CPLH
into a solid geometry SG
using SGofCPLz
with height h
.
- If no output is requested, plot the solid geometry using
SGplot
and CPLplot
for visual representation, and adjust lighting with setplotlight
and camlightTL
.
Algorithm explaination created using ChatGPT on 2025-08-19 08:21. (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