Methode · Body2
AddProfileBsplineByPts-Methode (Body2)
Legt eine B-Spline-Kurve durch Punkte als Profil an.
Syntax
Function AddProfileBsplineByPts( _
ByVal NumPoints As Long, _
ByVal PointArray As Variant _
) As ObjectSet swKurve = swBody.AddProfileBsplineByPts(3, vPunkte)Parameter
NumPointsLongByVal- Anzahl der Punkte.
PointArrayVariantByVal- Array mit 3 ×
NumPointsDouble-Werten, ab Index0.
Rückgabewert
Die Kurve (Curve).
Beispiel
' swBody ist ein leerer Körper aus PartDoc.CreateNewBody.
Dim swKurve As SldWorks.Curve
Dim dPunkte(8) As Double ' drei Punkte, je X, Y, Z
dPunkte(3) = 0.02: dPunkte(4) = 0.01 ' zweiter Punkt (20 | 10 | 0) mm
dPunkte(6) = 0.04 ' dritter Punkt (40 | 0 | 0) mm
Set swKurve = swBody.AddProfileBsplineByPts(3, dPunkte)Bemerkungen
Du kannst die Kurve mit Body2.CreateRevolutionSurface zu einer Rotationsfläche oder mit Body2.CreateExtrusionSurface zu einer Extrusionsfläche machen.
Zahlen-Arrays: Punkte, Richtungen und Parameter übergibst du als Double-Array, etwa Dim d(2) As Double. Bei verwandten Befehlen wie Body2.AddProfileArc und Body2.CreatePlanarSurface lieferte Array(...) in SOLIDWORKS 2024 Nothing oder False, ohne Fehlermeldung.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2001Plus
Englisches Original: IBody2::AddProfileBsplineByPts in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.