/
PPM-Beispielsymbol

PPM-Beispielsymbol

Nur von TurboCAD Platinum unterstützt

Der folgende Code erzeugt ein Fenster. Um das sich ergebende Fenster verwenden zu können, haben Sie folgende Möglichkeiten:

  • Speichern Sie das Skript als .ppm-Datei, laden Sie den Ordner mit der Datei in die Symbolbibliothek und ziehen Sie das Symbol in eine Wand.
  • Führen Sie das PPM-Skript aus. Markieren Sie das Element und wandeln Sie es in einen Block um. Ziehen Sie den Block aus der Blockpalette in eine Wand.

 


3ArchWindow.ppm


Units(1[mm]);

H = Parameter("Window Height", 1200, LINEAR, Interval(400, 10000));

W = Parameter("Window Width", 2000, LINEAR, Interval(700, 10000));
Curvature = Parameter("Curvature", 40, LINEAR, Interval(0, 100));
elevation = Parameter("Window Eleveation", 700, LINEAR, Interval(0, 10000));
sash = Parameter("Window Sash", 30, LINEAR, Interval(0, 100));

W1 = W/3.0;

P00 = Point(0,0);
P10 = Point(0, H);
P11 = Point(W1, H);
P12 = Point(2*W1, H);
P13 = Point(3*W1, H);
P03 = Point(3*W1, 0);

C1 = Point(0.5*(PointX(P10) + PointX(P11)),
0.5*(PointY(P10) + PointY(P11)) - Curvature);

C2 = Point(0.5*(PointX(P11) + PointX(P12)),
0.5*(PointY(P11) + PointY(P12)) - Curvature);

C3 = Point(0.5*(PointX(P12) + PointX(P13)),
0.5*(PointY(P12) + PointY(P13)) - Curvature);

contour = Polyline(P10, Arc0(PointX(C1), PointY(C1)), P11,
Arc0(PointX(C2), PointY(C2)), P12,
Arc0(PointX(C3), PointY(C3)), P13,
P03, P00, P10);


contourZ = RotateX(contour, 90);
ClipContour = SetProperties(contourZ, "#$AUX@_Contour" = 1, "PenColor"= 0x0000ff);
TS = RefPoint (W/2, 0, -elevation);
Output(ClipContour, TS);


PL = Point(sash/2, H);
PR = Point(W1 - sash/2, H);
ArcWind1 = Polyline(Point(sash/2, 0),
Point(sash/2, H),
Arc0(PointX(C1), PointY(C1)),
Point(W1 - sash/2, H),
Point(W1 - sash/2, 0),
Point(sash/2, 0));
ArcWindz1 = RotateX(ArcWind1, 90);

ArcWind2 = Move(ArcWind1, W1, 0, 0);
ArcWindz2 = RotateX(ArcWind2, 90);

ArcWind3 = Move(ArcWind2, W1, 0, 0);
ArcWindz3 = RotateX(ArcWind3, 90);

ArcWindz1D = Thickness(ArcWindz1, sash);
ArcWindz1Surf = SetProperties(ArcWindz1D, "Solid" = 0);

ArcWindz2D = Thickness(ArcWindz2, sash);
ArcWindz2Surf = SetProperties(ArcWindz2D, "Solid" = 0);

ArcWindz3D = Thickness(ArcWindz3, sash);
ArcWindz3Surf = SetProperties(ArcWindz3D, "Solid" = 0);

contourZ3D = Thickness(contourZ, sash);
contourZ3DSurf = SetProperties(contourZ3D, "Solid" = 0);

res1 = BooleanSubtract(contourZ3DSurf, ArcWindz3Surf);
res2 = BooleanSubtract(res1, ArcWindz2Surf);
res3 = BooleanSubtract(res2, ArcWindz1Surf);


Output(res3);

 

Related content

Example PPM Symbol
Example PPM Symbol
More like this
Example PPM Symbol
Example PPM Symbol
More like this
Parametric Part Manager
Parametric Part Manager
More like this
Parametric Part Script Editor
Parametric Part Script Editor
More like this