Han-Create 3D object

From Vectorlab
Jump to: navigation, search


Creates an extrude from a HANDLE h, preserving the original h. Returns a handle to the extrude. This doesn't do any check, so be careful with the returned handle. You better pass valid object to be extruded. By Orso B. Schmid


{ Orso **************************************** }
{ creates an extrude from a HANDLE h, preserving the original h. Returns a handle to the extrude }
FUNCTION H_Create3Dobj(h: HANDLE; z, dZ: REAL): HANDLE;
	BEGIN
		IF h <> NIL THEN BEGIN
			BeginXtrd(z, dZ);
			Line(1, 1); { just draw something for creating an extrude container }
			EndXtrd;
				
			DelObject(FIn3D(GetParent(CreateDuplicateObject(h, LNewObj))));
			{ places a Copy of h in the extrude and Deletes the line }
				
			H_Create3Dobj := LNewObj;
		END;
	END;