TeklaAPIExtensions.Model
0.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package TeklaAPIExtensions.Model --version 0.0.3
NuGet\Install-Package TeklaAPIExtensions.Model -Version 0.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TeklaAPIExtensions.Model" Version="0.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TeklaAPIExtensions.Model --version 0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TeklaAPIExtensions.Model, 0.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install TeklaAPIExtensions.Model as a Cake Addin #addin nuget:?package=TeklaAPIExtensions.Model&version=0.0.3 // Install TeklaAPIExtensions.Model as a Cake Tool #tool nuget:?package=TeklaAPIExtensions.Model&version=0.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tekla API Extensions
A collection of extension methods for Tekla Structures Open API to simplify common operations and improve code readability.
Features
- Extension methods for working with geometry:
PointExtensions
: Transform points, calculate averages, remove duplicatesLineSegmentExtensions
: Cut line segments by planes and bounding boxesSolidExtensions
: Get faces, calculate bounding boxesFaceExtensions
: Extract loops and vertices
- Model object extensions:
ModelObjectExtensions
: Easy access to properties and UDAsModelObjectEnumeratorExtensions
: LINQ-style filtering
- Drawing extensions:
DrawingObjectEnumeratorExtensions
: LINQ-style filteringPointListExtensions
: Convert between point collections
Installation
.NET CLI:
dotnet add package TeklaAPIExtensions.Model
dotnet add package TeklaAPIExtensions.Drawing
Project reference:
<ItemGroup>
<PackageReference Include="TeklaAPIExtensions.Model" Version="0.0.2" />
<PackageReference Include="TeklaAPIExtensions.Drawing" Version="0.0.1" />
</ItemGroup>
Usage
using Tekla.Structures.Geometry3d;
using Tekla.Structures.Model;
using Tekla.Structures.Solid;
using TeklaAPIExtensions.Model;
using TeklaAPIExtensions.Drawing;
// Filter model objects by type
var selectedObjects = new Tekla.Structures.Model.UI.ModelObjectSelector().GetSelectedObjects();
var beams = selectedObjects.OfType<Beam>();
// Get property values safely
var modelObject = beams.First();
if (modelObject.TryGetProperty("PROFILE", out string profile))
{
// Use profile value
}
// Transform points
List<Point> points = [new(0, 0, 0), new(1000, 1000, 1000)];
CoordinateSystem coordinateSystem = new(new Point(100, 100, 100), new Vector(1, 0, 0), new Vector(0, 1, 0));
var transformedPoints = points.Transform(coordinateSystem);
// Get visible faces
Solid solid = beams.First().GetSolid();
Vector viewDirection = new(0, 0, 1);
List<Face> visibleFaces = solid.GetVisibleFaces(viewDirection).ToList();
Requirements
- .NET Standard 2.0
- Tekla Structures 2024 or newer
- Valid Tekla Open API license
Licence
MIT License. See LICENSE
file for details.
Note: This is an independent library and is not endorsed by or affiliated with Trimble Solutions Corporation. Tekla Structures and Tekla Open API are trademarks of Trimble Solutions Corporation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Tekla.Structures.Model (>= 2024.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.