Autor Beitrag
holger
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

W2K pro, XP pro
Delphi 6, Delphi 2007
BeitragVerfasst: Fr 07.09.07 19:11 
Hallo Delphianer :wink: ,

ich habe mal ein Übersetzungstechnisches Problem.

Ich schreibe gerade an einem Programm, mit welchem ich eine DXF-Polylinie erzeugen will.
Leider bekomme ich den ausschlaggebenden Wert für einen Kreisbogen nicht hin.
Ich probiere schon mehrere Tage, komme aber nicht zum Ziel.

Dokumentiert ist dieser Wert so:

Text1:
[highlight]The bulge is the
tangent of 1/4 the included angle for an arc segment, made
negative if the arc goes clockwise from the start point to
the endpoint; a bulge of 0 indicates a straight segment,
and a bulge of 1 is a semicircle.[/highlight]

Übersetzt mit Google
Die Ausbuchtung ist
Tangente von 1/4 der enthaltene Winkel für ein Bogensegment, gebildet
Negativ, wenn der Bogen nach rechts von Anfang an Punkt zu geht
der Endpunkt; eine Ausbuchtung von 0 zeigt ein gerades Segment an,
und eine Ausbuchtung von 1 ist ein Halbrund.

Text2
[highlight]The bulge is the tangent of one fourth the included angle for
an arc segment, made negative if the arc goes clockwise from
the start point to the endpoint. A bulge of 0 indicates a straight
segment, and a bulge of 1 is a semicircle.[/highlight]

Übersetzt mit Google
Die Ausbuchtung ist die Tangente von Viertel enthaltenen Winkel für
ein Bogensegment, gebildet Negativ, wenn der Bogen nach rechts von
Anfang an Punkt zum Endpunkt geht. Eine Ausbuchtung von 0 zeigt ein
gerades Segment an, und eine Ausbuchtung von 1 ist ein Halbrund.

Die Sache mit dem Uhrzeigersin und dem Wert Wert 1 und 0 leuchtet mir ein. Aber den Rest verstehe ich nicht.

Wie kann ich Bulge errechnen? Was sagt dieser Text aus?
Geht aus diesem Text evtl. hervor, ob es sich um einen Deg-, Rad- oder Grad- Wert handelt (Gradmaß, Bogenmaß, ??).



a bulge of 1 is a semicircle
Das währe nach meiner Deutung der Öffnungswinkel des Kreisbogens, wobei 180Grad einem wert von 1 entsprechen.
Dann währen 90Grad 0,5. Das stimmt aber leider nicht.

Bulge Könnte auch der Winkel zwischen der Sehne und der Tangente sein, welche durch den Anfangspunkt des Kreisbogens verläuft. Paßt aber nicht.

Die Wölbung des Bogens, also die Höhe habe ich auch schon probiert. Negativ.

Jede Idee ist wilkommen.


Vielen Dank im Voraus


Moderiert von user profile iconChristian S.: Topic aus Sonstiges (Delphi) verschoben am Fr 07.09.2007 um 20:13
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 07.09.07 19:28 
Wenn ich das richtig kapiere, ist das So gemeint:

Du hast Punkte A und B, die den Start- und Endpunkt deines Segmentes angeben.

Zeichne nun Clockweise deinen Kreisbogen.. Der Mittelpunkt dieses Kreisbogensegmentes sei C.
Probier jetzt mal, ob das Ergebnis für den Winkel BCA korrekt ist.

Ansonsten muss ich sagen, hat Google hier mal halbwegs ne brauchbare wörtliche Übersetzung abgegeben; auch wenn sie sinngemäß in die Tonne zu drücken ist - wie immer ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
holger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

W2K pro, XP pro
Delphi 6, Delphi 2007
BeitragVerfasst: Fr 07.09.07 19:50 
Hi BenBE,

A-B-C ist bei mir der Öffnungswinkel des Bogens (0...360Grad möglich). Das habe ich schon versucht. Habe den Winkel auch in eine Verhältnisgleichung eingesetzt, so daß 180Grad (Halbkreis) 1 entspricht. -> geht nicht.

Das ist es leider nicht.
Trotzdem danke.
holger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

W2K pro, XP pro
Delphi 6, Delphi 2007
BeitragVerfasst: Fr 07.09.07 19:52 
Ich meinte B-C-A
holger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46

W2K pro, XP pro
Delphi 6, Delphi 2007
BeitragVerfasst: Fr 07.09.07 21:38 
Juhu :dance2:
Mir hat jetzt jemand im Cad.de-Forum weitergeholfen.

Zitat:
"the tangent" ist nicht die Tangente sondern der Tangens,
ich würde also sagen bulge = tan(alpha/4), wobei alpha der durch das Bogensegment eingeschlossene Winkel ist (Winkel zwischen den Linien von den Endpunkten des Bogens zum Bogenmittelpunkt)
Dann klappt's auch mit dem Halbkreis weil tan(180°/4)=1.


Und es klappt.

ausblenden Delphi-Quelltext
1:
2:
3:
// Bulge
temp:=(Oeffnungswinkel*pi)/180;
Bulge:=tan(temp/4);


Also doch irgendwie B-C-A


Schönes WE wünscht Holger