Draft WireToBSpline/de: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav/de
|[[Draft_SubelementHighlight|Subelement highlight]]
|[[Draft_Downgrade/de|Herabstufen]]
|[[Draft_AddPoint|Add point]]|[[Draft_Module|Draft]]
|[[Draft_Draft2Sketch/de|EntwurfZuSkizze]]
|IconL=Draft_SubelementHighlight.svg
|[[Draft_Workbench/de|Draft]]
|IconL=Draft_Downgrade.svg
|IconR=Draft_Draft2Sketch.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_AddPoint.svg
}}
}}


{{GuiCommand/de
<div class="mw-translate-fuzzy">
|Name=Draft WireToBSpline
{{GuiCommand/de|Name=Draft WireToBSpline|Name/de=Draft WireToBSpline|Workbenches=[[Draft Module/de|Draft]], [[Arch Module/de|Arch]]|MenuLocation=Drafting → Wire to BSpline}}
|Name/de=Entwurf DrahtZuBSpline
</div>
|MenuLocation=Änderung → Draht zu BSpline
|Workbenches=[[Draft_Workbench/de|Entwurf]], [[Arch_Workbench/de|Architektur]]
|SeeAlso=[[Draft_Wire/de|Entwurf Draht]], [[Draft_BSpline/de|Entwurf BSpline]]
}}


==Description==
==Beschreibung==


Der [[Image:Draft_WireToBSpline.svg|24px]] '''Entwurf DrahtZuBSpline''' Befehl konvertiert [[Draft_Wire/de|Entwurf Drähte]] in [[Draft_BSpline/de|Entwurf BSplines]] und umgekehrt.
The {{Button|[[Image:Draft WireToBSpline.svg|16px]] [[Draft WireToBSpline|Draft WireToBSpline]]}} tool converts {{Button|[[Image:Draft_Wire.svg|16px]] [[Draft Wire|Draft Wires]]}} to {{Button|[[Image:Draft BSpline.png|16px]] [[Draft BSpline|Draft BSplines]]}}, and vice-versa.


[[Image:Draft Wire2BSpline example.jpg|400px]]
[[Image:Draft_Wire2BSpline_example.jpg|400px]]
{{Caption|Umwandlung eines Entwurf Drahtes in eine Entwurf BSpline und einer geschlossenen Entwurf BSpline in einen geschlossenen Entwurf Draht}}
{{Caption|Convertir a wire to a B-Spline, and a closed B-Spline to a closed wire}}


==Usage==
==Anwendung==


# Wähle einen [[Draft_Wire/de|Entwurf Draht]] oder einen [[Draft_BSpline/de|Entwurf BSpline]].
# Select a [[Draft Wire|Draft Wire]] or a [[Draft BSpline|Draft BSpline]]. The tool is disabled if no object is selected.
# Es gibt mehrere Möglichkeiten, den Befehl aufzurufen:
# Press the {{Button|[[Image:Draft WireToBSpline.svg|16px]] [[Draft WireToBSpline|Draft WireToBSpline]]}} button.
#* Drücke die {{Button|[[Image:Draft_WireToBSpline.svg|16px]] [[Draft_WireToBSpline/de|Entwurf DrahtZuBSpline]]}} Schaltfläche.
#* Wähle den {{MenuCommand|Änderung → [[Image:Draft_WireToBSpline.svg|16px]] Draht zu Bspline}} aus dem Menü.
# Ein neues Objekt wird erstellt.


==Hinweise==
A new object will be created; the original object will not be modified.


* Der Befehl kann zu einem geschlossenen, sich selbst durchdringenden [[Draft_Wire/de|Entwurf Draht]] oder [[Draft_BSpline/de|Entwurf BSpline]] mit einer Fläche führen. Ein solches Objekt wird in der [[3D_view/de|3D Ansicht]] nicht korrekt dargestellt. Seine {{PropertyData|Erstelle Fläche}} Eigenschaft oder seine {{PropertyData|Geschlossen}} Eigenschaft muss auf {{FALSE}} gesetzt werden.
{{Emphasis|Note:}} if a closed wire with sharp edges is used to create a spline, the new object may have self intersecting curve segments, and may not be visible in the 3D view. If this is the case, manually set {{PropertyData|Make Face}} to {{FALSE}} to see the new shape, or set {{PropertyData|Closed}} to {{FALSE}} to create an open shape.


==Options==
==Skripten==


<div class="mw-translate-fuzzy">
There are no options for this tool. Either it works with the selected object or not.
Siehe auch: [https://freecad.github.io/SourceDoc/ Autogenerierte API Dokumentation] und [[FreeCAD_Scripting_Basics/de|FreeCAD Grundlagen Skripten]].
</div>


<div class="mw-translate-fuzzy">
==Scripting==
Um einen Draht in einen Bspline umzuwandeln oder umgekehrt, übergib die Eigenschaft {{incode|Points}} des Quellobjekts an die Methode {{incode|[[Draft BSpline/de#Skripten|make_bspline]]}} bzw. die Methode {{incode|[[Draft_Wire/de#Skripten|make_wire]]}} des Entwurf Moduls.
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
</div>


Beispiel:
There is no programming interface available for the WireToBSpline tool; however, creating a new object from the points of another is simple.

The {{incode|Points}} attribute of an object is a list with the points that comprise that object; this list can be passed to functions that build geometry. Each point is defined by its {{incode|FreeCAD.Vector}}, with units in millimeters.

Example:


{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft


doc = App.newDocument()
# Make a spline from the points of a wire
p1 = FreeCAD.Vector(1000, 1000, 0)
p2 = FreeCAD.Vector(2000, 1000, 0)
p3 = FreeCAD.Vector(2500, -1000, 0)
p4 = FreeCAD.Vector(3500, -500, 0)


base_wire = Draft.makeWire([p1, p2, p3, p4])
p1 = App.Vector(1000, 1000, 0)
p2 = App.Vector(2000, 1000, 0)
p3 = App.Vector(2500, -1000, 0)
p4 = App.Vector(3500, -500, 0)

base_wire = Draft.make_wire([p1, p2, p3, p4])
base_spline = Draft.make_bspline([-p1, -1.3*p2, -1.2*p3, -2.1*p4])


points1 = base_wire.Points
points1 = base_wire.Points
spline = Draft.makeBSpline(points1)
spline_from_wire = Draft.make_bspline(points1)

# Make a wire from the points of a spline
base_spline = Draft.makeBSpline([-p1, -1.3*p2, -1.2*p3, -2.1*p4])


points2 = base_spline.Points
points2 = base_spline.Points
Wire = Draft.makeWire(points2)
wire_from_spline = Draft.make_wire(points2)

doc.recompute()
}}
}}



{{Docnav
{{Docnav/de
|[[Draft_SubelementHighlight|Subelement highlight]]
|[[Draft_Downgrade/de|Herabstufen]]
|[[Draft_AddPoint|Add point]]
|[[Draft_Draft2Sketch/de|EntwurfZuSkizze]]
|[[Draft_Module|Draft]]
|[[Draft_Workbench/de|Draft]]
|IconL=Draft_SubelementHighlight.svg
|IconL=Draft_Downgrade.svg
|IconR=Draft_Draft2Sketch.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_AddPoint.svg
}}
}}


{{Draft Tools navi}}
{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

{{Userdocnavi}}
{{clear}}

Revision as of 10:32, 25 November 2021

Entwurf DrahtZuBSpline

Menüeintrag
Änderung → Draht zu BSpline
Arbeitsbereich
Entwurf, Architektur
Standardtastenkürzel
Keiner
Eingeführt in Version
-
Siehe auch
Entwurf Draht, Entwurf BSpline

Beschreibung

Der Entwurf DrahtZuBSpline Befehl konvertiert Entwurf Drähte in Entwurf BSplines und umgekehrt.

Umwandlung eines Entwurf Drahtes in eine Entwurf BSpline und einer geschlossenen Entwurf BSpline in einen geschlossenen Entwurf Draht

Anwendung

  1. Wähle einen Entwurf Draht oder einen Entwurf BSpline.
  2. Es gibt mehrere Möglichkeiten, den Befehl aufzurufen:
  3. Ein neues Objekt wird erstellt.

Hinweise

  • Der Befehl kann zu einem geschlossenen, sich selbst durchdringenden Entwurf Draht oder Entwurf BSpline mit einer Fläche führen. Ein solches Objekt wird in der 3D Ansicht nicht korrekt dargestellt. Seine DatenErstelle Fläche Eigenschaft oder seine DatenGeschlossen Eigenschaft muss auf false gesetzt werden.

Skripten

Um einen Draht in einen Bspline umzuwandeln oder umgekehrt, übergib die Eigenschaft Points des Quellobjekts an die Methode make_bspline bzw. die Methode make_wire des Entwurf Moduls.

Beispiel:

import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(1000, 1000, 0)
p2 = App.Vector(2000, 1000, 0)
p3 = App.Vector(2500, -1000, 0)
p4 = App.Vector(3500, -500, 0)

base_wire = Draft.make_wire([p1, p2, p3, p4])
base_spline = Draft.make_bspline([-p1, -1.3*p2, -1.2*p3, -2.1*p4])

points1 = base_wire.Points
spline_from_wire = Draft.make_bspline(points1)

points2 = base_spline.Points
wire_from_spline = Draft.make_wire(points2)

doc.recompute()