SGcolorcopy
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 4.7, Creation date: 2019-07-13, Last change: 2025-09-14
copies facet colors of a reference solid to a requreste
Description
Since many operations modify facet lists it is very difficult to maintain facet related colors during the operations. Therefor, this function copies the colors of a solid that are used in another one. Facet are considered as identical if they use the same vertices in the same order
See Also: SGcolorfaces
, SGcolorseparation
Example Illustration
Syntax
SGA=SGcolorcopy(SGA,SGB)
Input Parameter
SGA: | | Solid to be colored |
SGB: | | Colored reference solid |
Output Parameter
SGA: | | Solid with copied colors |
Examples
SGofCPLz(PLstar(10),5); A=ans;
SGofCPLz(PLcircle(10),5); B=ans; SGtransrelSG(B,A,'ontop',5,'transx',3); B=ans
SGTset(A,'M',[0 0 1]); A=ans;
SGTset(B,'S',[0 0 -1]); B=ans;
SGconnect2FS(A,B,FSofSGfacet(A,31),TofFS(B,[0 0 -1])); C=ans
B=SGcolorfaces(B,'g')
SGcolorcopy(C,B)
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
Last html export of this page out of FM database by TL: 2025-09-21