Methode · ModelDoc2
CreateClippedSplines-Methode (ModelDoc2)
Erzeugt Spline-Segmente in der aktiven Skizze, beschnitten an einem Rechteck.
Syntax
Function CreateClippedSplines( _
ByVal ParamsIn As Variant, _
ByVal X1 As Double, _
ByVal Y1 As Double, _
ByVal X2 As Double, _
ByVal Y2 As Double _
) As VariantvSegs = swModel.CreateClippedSplines(dParams, -0.05, -0.05, 0.05, 0.05)Parameter
ParamsInVariantByVal- Die Spline als Zahlenfeld (siehe Bemerkungen).
X1DoubleByVal- x der unteren Ecke des Rechtecks.
Y1DoubleByVal- y der unteren Ecke.
X2DoubleByVal- x der oberen Ecke.
Y2DoubleByVal- y der oberen Ecke.
Rückgabewert
Array der neuen Skizzensegmente (SketchSegment).
Beispiel
' swModel ist ein Teil mit aktiver 2D-Skizze.
Dim dP(13) As Double
Dim vSegs As Variant
dP(0) = 3: dP(1) = 2: dP(2) = 2: dP(3) = 0 ' Dimension, Ordnung, Kontrollpunkte, nicht periodisch
dP(4) = 0: dP(5) = 0: dP(6) = 1: dP(7) = 1 ' Knoten
dP(8) = -0.1: dP(9) = 0: dP(10) = 0 ' Kontrollpunkt 1 ...
dP(11) = 0.1: dP(12) = 0: dP(13) = 0 ' ... Kontrollpunkt 2
vSegs = swModel.CreateClippedSplines(dP, -0.05, -0.05, 0.05, 0.05)
If IsArray(vSegs) Then Debug.Print UBound(vSegs) + 1 & " Segment(e)"Bemerkungen
Aufbau von ParamsIn: Dimension, Ordnung, Anzahl Kontrollpunkte, Periodizität, dann die Knoten (Anzahl Kontrollpunkte + Ordnung), dann die Kontrollpunkte. Bei Dimension 3 hat jeder Punkt x, y, z, bei Dimension 4 zusätzlich das Gewicht w.
Das Rechteck liegt im Koordinatensystem der aktiven 2D-Skizze. In einer 3D-Skizze ist das Ergebnis nicht festgelegt.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2001Plus
Englisches Original: IModelDoc2::CreateClippedSplines in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.