SGN=SGTcopyinteralframes(SGA,SGB)
SGA : | Solid to add the frames to | |
SGB : | Solid to copy the frames from |
SGN : | Final Solid including the frames ot the Origina |
load ADAM_Aframes.mat; SG=ADAM_Aframes
CPLofSGcutT(SG,SGTget(SG,'VL'),[0 0]); CPL=ans;
SGofCPLz(CPLbuffer(CPL,1),[-0.5 0.5],SGTget(SG,'VL')); SGX=ans;
A=SGsubtract(SG,SGX)
SGsurfaces(A); A=ans; B=A{2}; C=A{1};
This function, SGTcopyinteralframes
, is designed to copy frames from one solid (SGB) to another (SGA) if they are located within the interior of SGA. It is part of the SolidGeometry library and is used after cutting a solid into two pieces to ensure that the corresponding frames are correctly assigned to each piece.
SGN
as SGA
.SGB
using a loop:SGB.T{i}(1:3,4)
) is inside SGA
using the function SGisInterior
.SGA
, copy it to SGN
using the function SGTcopy
, passing the frame's name SGB.Tname{i}
.nargout==0
), plot the resulting solid SGN
using SGfigure
and SGTplotalpha
with a white color ('w').The example provided in the comments demonstrates loading a solid, cutting it, and then using this function to ensure frames are correctly assigned to the resulting pieces.
Algorithm explaination created using ChatGPT on 2025-08-19 01:02. (Please note: No guarantee for the correctness of this explanation)