ShapeItemInsert Method |
Inserts a shape to the shape catalog based on the shape geometry (does not allow duplicate geometry).
Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
Examples
using System; using Tekla.Structures.Catalogs; public class Example { public void InsertSimpleCube() { var vertices = new[] { new Vector( 0.0, 0.0, 0.0), // 0 new Vector(300.0, 0.0, 0.0), // 1 new Vector(300.0, 300.0, 0.0), // 2 new Vector( 0.0, 300.0, 0.0), // 3 new Vector( 0.0, 0.0, 300.0), // 4 new Vector(300.0, 0.0, 300.0), // 5 new Vector(300.0, 300.0, 300.0), // 6 new Vector( 0.0, 300.0, 300.0), // 7 }; var outloop = new[] { new[] { 0, 3, 2, 1 }, new[] { 0, 1, 5, 4 }, new[] { 1, 2, 6, 5 }, new[] { 2, 3, 7, 6 }, new[] { 3, 0, 4, 7 }, new[] { 4, 5, 6, 7 }}; var innerLoop = new Dictionary{int, int[][]} { }; var brep = new FacetedBrep(vertices, outloop, innerLoop); var shapeItem = new ShapeItem { Name = "MyNiceCubeBrep", ShapeFacetedBrep = brep, UpAxis = ShapeUpAxis.Z_Axis }; var result = shapeItem.Insert(); } }
See Also