Methode · Body2
AddProfileBspline-Methode (Body2)
Legt eine B-Spline-Kurve als Profil für Rotations- oder Extrusionsflächen an.
Syntax
Function AddProfileBspline( _
ByVal Props As Variant, _
ByVal Knots As Variant, _
ByVal CtrlPtCoords As Variant _
) As ObjectSet swKurve = swBody.AddProfileBspline(vProps, vKnoten, vPunkte)Parameter
PropsVariantByVal- Vier Ganzzahlen, gepackt in zwei
Double-Werte: Dimension der Kontrollpunkte, Ordnung, Anzahl Kontrollpunkte, Periodizität. KnotsVariantByVal- Knotenvektor mit Anzahl Kontrollpunkte + Ordnung Werten.
CtrlPtCoordsVariantByVal- Koordinaten der Kontrollpunkte.
Rückgabewert
Die Kurve (Curve).
Beispiel
' swBody ist ein leerer Körper aus PartDoc.CreateNewBody.
' vProps, vKnoten und vPunkte sind wie in den Bemerkungen beschrieben vorbereitet.
Dim swKurve As SldWorks.Curve
Set swKurve = swBody.AddProfileBspline(vProps, vKnoten, vPunkte)Bemerkungen
Du kannst die Kurve mit Body2.CreateRevolutionSurface zu einer Rotationsfläche oder mit Body2.CreateExtrusionSurface zu einer Extrusionsfläche machen. Wie die Ganzzahlen in Props gepackt werden, beschreibt die Hilfe nicht. Einfacher ist Body2.AddProfileBsplineByPts, das nur Punkte braucht. Die Hilfe nennt für die Länge der Koordinaten „Anzahl Kontrollpunkte + Dimension“. Gemeint ist vermutlich „mal“.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2001Plus
Englisches Original: IBody2::AddProfileBspline in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.