This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Uuid": "2493b807-0c2e-48d4-8838-e6c9b55015ed", | |
| "IsCustomNode": false, | |
| "Description": "", | |
| "Name": "ChatGPT-Geometry generator", | |
| "ElementResolver": { | |
| "ResolutionMap": { | |
| "Cuboid": { | |
| "Key": "Autodesk.DesignScript.Geometry.Cuboid", | |
| "Value": "ProtoGeometry.dll" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static float[] ZToYTransform(this InwLTransform3f3 transform) | |
| { | |
| //Important casting to be made before quering the information from the COM class | |
| dynamic matrix = transform.Matrix; | |
| var _m = (Array)(object)matrix; | |
| //Recreate current matrix | |
| var _matrix = new Matrix4x4( | |
| (float)(double)_m.GetValue(1), (float)(double)_m.GetValue(2), (float)(double)_m.GetValue(3), 0f, | |
| (float)(double)_m.GetValue(5), (float)(double)_m.GetValue(6), (float)(double)_m.GetValue(7), 0f, | |
| (float)(double)_m.GetValue(9), (float)(double)_m.GetValue(10), (float)(double)_m.GetValue(11), 0f, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static float[] ZToY(this float[] point) | |
| { | |
| var trans = new Matrix4x4(); | |
| trans.Translation = new Vector3((float)point[0], (float)point[1], (float)point[2]); | |
| var finalMatrix = Matrix4x4.Multiply(Matrix4x4.Multiply(_rotationMatrix, trans), | |
| _invertedRotation); | |
| var translation = finalMatrix.Translation; | |
| return new float[] { translation.X, translation.Y, translation.Z }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private async void UploadPDF(byte[] pdfString, string channel_id, string user_name) | |
| { | |
| using (var httpClient = new HttpClient()) | |
| { | |
| HttpResponseMessage? response = null; | |
| var request = new HttpRequestMessage(new HttpMethod("POST"), "https://slack.com/api/files.upload"); | |
| JsonElement JO = new JsonElement(); | |
| request.Headers.TryAddWithoutValidation("Authorization", "Bearer XXXX"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Function | |
| { | |
| /// <summary> | |
| /// Creates a PDF based on parameters | |
| /// </summary> | |
| /// <param name="Parameters"></param> | |
| /// <param name="context"></param> | |
| /// <returns></returns> | |
| public string FunctionHandler(Dictionary<string?, string?> Parameters, ILambdaContext context) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest request, | |
| ILambdaContext context) | |
| { | |
| APIGatewayProxyResponse _APIGatewayProxyResponse = new APIGatewayProxyResponse(); | |
| _APIGatewayProxyResponse.StatusCode = 200; | |
| _APIGatewayProxyResponse.Headers = new Dictionary<string, string>(); | |
| _APIGatewayProxyResponse.Headers.Add("Content-Type", "application/json"); | |
| _APIGatewayProxyResponse.Body = "In progress"; | |
| var Parameters = HttpUtility.ParseQueryString(request.Body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<APIGatewayProxyResponse> FunctionHandler(APIGatewayProxyRequest request, | |
| ILambdaContext context) | |
| { | |
| APIGatewayProxyResponse _APIGatewayProxyResponse = new APIGatewayProxyResponse(); | |
| _APIGatewayProxyResponse.StatusCode = 200; | |
| _APIGatewayProxyResponse.Headers = new Dictionary<string, string>(); | |
| _APIGatewayProxyResponse.Headers.Add("Content-Type", "application/json"); | |
| _APIGatewayProxyResponse.Body = "In progress"; | |
| var Parameters = HttpUtility.ParseQueryString(request.Body); |