Draft Wire/es: Difference between revisions

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

{{Docnav|[[Draft_Line|Line]]|[[Draft_Fillet|Fillet]]|[[Draft_Module|Draft]]|IconL=Draft_Line.svg |IconC=Workbench_Draft.svg|IconR=Draft_Fillet.svg}}
{{Docnav
|[[Draft_Line|Line]]
|[[Draft_Fillet|Fillet]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Line.svg
|IconR=Draft_Fillet.svg
|IconC=Workbench_Draft.svg
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{GuiCommand/es
{{GuiCommand/es|Name=Draft Wire|Name/es=Draft Wire|Workbenches=[[Draft Module/es|Croquis]], [[Arch Module/es|Arquitectura]]|Shortcut=W I|MenuLocation=Croquis -> Polilínea|Ver también=[[Draft Line/es|Línea Boceto]], [[Draft BSpline/es|BSpline Boceto]]}}
|Name=Draft Wire
|Name/es=Draft Wire
|MenuLocation=Croquis -> Polilínea
|Workbenches=[[Draft_Workbench/es|Croquis]], [[Arch_Workbench/es|Arquitectura]]
|Shortcut={{KEY|P}} {{KEY|L}}
|Version=0.7
|SeeAlso=[[Draft Line/es|Línea Boceto]], [[Draft BSpline/es|BSpline Boceto]]
}}
</div>
</div>

==Description==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 12: Line 30:
</div>
</div>


The corners of a Draft Wire can be filleted (rounded) or chamfered by changing its {{PropertyData|Fillet Radius}} or {{PropertyData|Chamfer Size}} respectively. It is also possible to subdivide the edges of a Draft Wire by changing its {{PropertyData|Subdivisions}} property.
The [[Draft BSpline|Draft BSpline]] tool behaves like the Wire tool, except that each of its segments is curved instead of being a straight line. Use [[Draft WireToBSpline|Draft WireToBSpline]] to convert one to the other.


[[Image:Draft_Polyline_example.jpg|400px]]
[[Image:Draft_Polyline_example.jpg|400px]]
Line 18: Line 36:
[[Image:Draft_Polyline_example.jpg|400px]]
[[Image:Draft_Polyline_example.jpg|400px]]
</div>
</div>

==Create==

===Usage===

See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 23: Line 47:


# Presiona el botón {{KEY|[[Image:Draft Wire.png|16px]] [[Draft Wire/es|Contorno]]}}, o presiona las teclas {{KEY|W}} y {{KEY|I}}
# Presiona el botón {{KEY|[[Image:Draft Wire.png|16px]] [[Draft Wire/es|Contorno]]}}, o presiona las teclas {{KEY|W}} y {{KEY|I}}
# Selecciona un primer punto en la vista 3D, o escribe unas [[Draft_Coordinates/es|coordenadas]]
# Selecciona un primer punto en la vista 3D, o escribe unas coordenadas
# Selecciona puntos adicionales en la vista 3D, o escribe [[Draft_Coordinates/es|coordenadas]]
# Selecciona puntos adicionales en la vista 3D, o escribe coordenadas
# Presiona {{KEY|F}} o {{KEY|C}}, o haz doble clic en el último punto, o selecciona el primer punto para terminar o cerrar el contorno. Si el contorno es cerrado, también será una cara, aunque su apariencia sea alámbrica.
# Presiona {{KEY|F}} o {{KEY|C}}, o haz doble clic en el último punto, o selecciona el primer punto para terminar o cerrar el contorno. Si el contorno es cerrado, también será una cara, aunque su apariencia sea alámbrica.
</div>
</div>


===Options===
The wire can be edited by double clicking on the element in the tree view, or by pressing the {{Button|[[Image:Draft Edit.svg|16px]] [[Draft Edit|Draft Edit]]}} button. Then you can move the points to a new position, or click {{Button|[[Image:Draft_AddPoint.svg|16px]] [[Draft_AddPoint|add point]]}} or {{Button|[[Image:Draft_DelPoint.svg|16px]] [[Draft_DelPoint|remove point]]}} and then click on the wire to add or remove points.


The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts (for version 0.22).
=== Fuse single lines ===
If several connected [[Draft Line|Draft Line]]s are selected when pressing the {{Button|[[Image:Draft Wire.svg|16px]] [[Draft Wire|Draft Wire]]}} button, they will be turned into a wire and the command will exit. {{Version|0.17}}

{{emphasis|Note:}} the end points of the lines must be exactly touching or they won't merge. If necessary, manually adjust the [[Draft Coordinates|Draft Coordinates]] of the start and end points of the lines, or use [[Draft Snap|Draft Snap]] with the [[Draft Endpoint|Draft Endpoint]] mode to make the nodes coincident.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Opciones==
==Opciones==
* Si se seleccionan [[Draft Line/es | Draft Lineas]] conectadas al presionar el botón '''Draft Wire''', se convertirán en un Wire y el comando terminara. {{Version | 0.17}}
* Si se seleccionan [[Draft Line/es | Draft Lineas]] conectadas al presionar el botón '''Draft Wire''', se convertirán en un Wire y el comando terminara. {{Version | 0.17}}
* Presiona {{KEY|F}} o el botón {{KEY|[[Image:Draft FinishLine.png|12px]] '''[[Draft_FinishLine/es|Terminar]]'''}} para finalizar el contorno, dejándolo abierto
* Presiona {{KEY|F}} o el botón {{KEY|[[Image:Draft FinishLine.png|12px]] '''Terminar'''}} para finalizar el contorno, dejándolo abierto
* Presiona {{KEY|C}} o el botón {{KEY|[[Image:Draft CloseLine.png|12px]] '''[[Draft_CloseLine/es|Cerrar]]'''}} o selecciona el primer punto para finalizar el contorno, pero haciendo que se cierre añadiendo un último segmento entre el último punto y el primero.
* Presiona {{KEY|C}} o el botón {{KEY|[[Image:Draft CloseLine.png|12px]] '''Cerrar'''}} o selecciona el primer punto para finalizar el contorno, pero haciendo que se cierre añadiendo un último segmento entre el último punto y el primero.
* Presiona {{KEY|X}}, {{KEY|Y}} o {{KEY|Z}} después de un punto para restringir el siguiente punto con respecto al eje dado.
* Presiona {{KEY|X}}, {{KEY|Y}} o {{KEY|Z}} después de un punto para restringir el siguiente punto con respecto al eje dado.
* Para introducir coordenadas manualmente, simplemente introduce los números, presiona {{KEY|ENTER}} entre cada componente X, Y y Z.
* Para introducir coordenadas manualmente, simplemente introduce los números, presiona {{KEY|ENTER}} entre cada componente X, Y y Z.
Line 47: Line 68:
* Presiona {{KEY|SHIFT}} mientras dibujas para [[Draft_Constrain/es|restringir]] tu siguiente punto horizontal o verticalmente en relación al último punto indicado.
* Presiona {{KEY|SHIFT}} mientras dibujas para [[Draft_Constrain/es|restringir]] tu siguiente punto horizontal o verticalmente en relación al último punto indicado.
* Presiona {{KEY|W}} o el botón {{KEY|[[Image:Draft Wipe.png|12px]] '''Contorno'''}} para eliminar el segmento existente y comenzar el contorno desde el último punto.
* Presiona {{KEY|W}} o el botón {{KEY|[[Image:Draft Wipe.png|12px]] '''Contorno'''}} para eliminar el segmento existente y comenzar el contorno desde el último punto.
* Presiona {{KEY|CTRL}}+{{KEY|Z}} o el botón {{KEY|[[Image:Draft UndoLine.png|12px]] '''[[Draft_UndoLine/es|Deshacer]]'''}} para deshacer el último punto.
* Presiona {{KEY|CTRL}}+{{KEY|Z}} o el botón {{KEY|[[Image:Draft UndoLine.png|12px]] '''Deshacer'''}} para deshacer el último punto.
* Presiona {{KEY|I}} o el botón {{KEY|'''Relleno'''}} para que el Wire se muestre como una cara si esta cerrada.
* Presiona {{KEY|I}} o el botón {{KEY|'''Relleno'''}} para que el Wire se muestre como una cara si esta cerrada.
* Presiona {{KEY|ESC}} o el botón {{KEY|'''Cancelar'''}} para abortar el comando Línea actual.
* Presiona {{KEY|ESC}} o el botón {{KEY|'''Cancelar'''}} para abortar el comando Línea actual.
Line 53: Line 74:
</div>
</div>


==Join==
<div class="mw-translate-fuzzy">
==Propiedades==


===Usage===
* {{PropertyData/es|Closed}}: Especifica si el contorno está cerrado o no

* {{PropertyData/es | Chamfer Size}}: especifica el tamaño de las esquinas achaflanadas
# The end points of the [[Draft_Line|Draft Lines]] and/or Draft Wires to be joined must be exactly coincident. If required first adjust points to ensure that this is the case.
* {{PropertyData/es|Fillet Radius}}: Especifica un radio de curvatura para dar a los nodos del contorno
# Select two or more [[Draft_Line|Draft Lines]] and/or Draft Wires.
* {{PropertyData/es | Subdivisions}}: divide los segmentos del cable con el número dado de subdivisiones {{version | 0.16}}
# There are several ways to invoke the command:
* {{PropertyData/es | Make Face}}: Rellena el Wire con una cara si está cerrado
#* Press the {{Button|[[Image:Draft_Wire.svg|16px]] [[Draft_Wire|Draft Wire]]}} button.
* {{PropertyView/es|End Arrow}}: Muestra un símbolo de flecha en el último punto del contorno, de modo que se puede utilizar como una anotación con línea directriz
#* Select the {{MenuCommand|Drafting → [[Image:Draft_Wire.svg|16px]] Polyline}} option from the menu.
* {{PropertyView/es | Pattern}}: especifica un patrón de sombreado para llenar el wire (wire cerrado)
#* Use the keyboard shortcut: {{KEY|P}} then {{KEY|L}}.
* {{PropertyView/es| Tamaño de patrón}}: especifica el tamaño del patrón de sombreado

</div>
==Notes==

* A Draft Wire can be edited with the [[Draft_Edit|Draft Edit]] command.
* A Draft Wire can be converted to a [[Draft_BSpline|Draft BSpline]] with the [[Draft_WireToBSpline|Draft WireToBSpline]] command.
* [[Draft_Line|Draft Lines]] and Draft Wires can also be joined with the [[Draft_Join|Draft Join]] command or the [[Draft_Upgrade|Draft Upgrade]] command.

==Properties==

See also: [[Property_editor|Property editor]].

A Draft Wire object is derived from a [[Part_Part2DObject|Part Part2DObject]] and inherits all its properties. It also has the following additional properties:


===Data===
===Data===

* {{PropertyData|Start}}: specifies the first point in the wire.
{{TitleProperty|Draft}}
* {{PropertyData|End}}: specifies the last point in the wire, not counting the initial point if the wire is closed.

* {{PropertyData|Closed}}: specifies if the wire is closed or not. If the wire is initially open, this value is {{FALSE}}; setting it to {{TRUE}} will draw a line segment to close the wire. If the wire is initially closed, this value is {{TRUE}}; setting it to {{FALSE}} will remove the last line segment, and make the wire open.
* {{PropertyData|Chamfer Size}}: specifies the size of the chamfers (straight segments) created on the corners of the wire.
* {{PropertyData|Area|Area}}: (read-only) specifies the area of the face of the wire. The value will be {{value|0.0}} if {{PropertyData|Make Face}} is {{FALSE}} or the face cannot be created.
* {{PropertyData|Base|Link}}
* {{PropertyData|Fillet Radius}}: specifies the radius of the fillets (arc segments) created on the corners of the wire.
* {{PropertyData|Make Face}}: specifies if the wire makes a face or not. If it is {{TRUE}} a face is created, otherwise only the edges are considered part of the object. This property only works if {{PropertyData|Closed}} is {{TRUE}}.
* {{PropertyData|Chamfer Size|Length}}: specifies the length of the chamfers at the corners of the wire.
* {{PropertyData|Closed|Bool}}: specifies if the wire is closed or not. If the wire is initially open this value is {{FALSE}}, setting it to {{TRUE}} will draw a line segment to close the wire. If the wire is initially closed this value is {{TRUE}}, setting it to {{FALSE}} will remove the last line segment and make the wire open.
:{{Emphasis|Note:}} do not set {{PropertyData|Make Face}} to {{TRUE}} if the wire intersects itself, as it won't create a proper face.
* {{PropertyData|Subdivisions}}: specifies the number of interior nodes in each segment of the wire. {{version|0.16}}
* {{PropertyData|End|VectorDistance}}: specifies the end point of the wire.
* {{PropertyData|Length}}: (read-only) specifies the length of the entire wire.
* {{PropertyData|Fillet Radius|Length}}: specifies the radius of the fillets at the corners of the wire.
* {{PropertyData|Length|Length}}: (read-only) specifies the total length of the wire.
* {{PropertyData|Make Face|Bool}}: specifies if the wire makes a face or not. If it is {{TRUE}} a face is created, otherwise only the edges are considered part of the object. This property only works if {{PropertyData|Closed}} is {{TRUE}} and if the wire does not self-intersect.
* {{PropertyData|Points|VectorList}}: specifies the points of the wire in its local coordinate system.
* {{PropertyData|Start|VectorDistance}}: specifies the start point of the wire.
* {{PropertyData|Subdivisions|Integer}}: specifies the number of subdivisions for each edge of the wire. If it is {{value|1}} each edge will be divided into {{value|2}} equal segments. Subdivisions are applied before chamfers and fillets.
* {{PropertyData|Tool|Link}}


===View===
===View===
* {{PropertyView|End Arrow}}: if it is {{TRUE}} it will display a symbol at the last point of the wire, so it can be used as an annotation line.
* {{PropertyView|Arrow Size}}: specifies the size of the symbol displayed at the end of the wire.
* {{PropertyView|Arrow Type}}: specifies the type of symbol displayed at the end of the wire, which can be "Dot", "Circle", "Arrow", or "Tick".
* {{PropertyView|Pattern}}: specifies a [[Draft Pattern|Draft Pattern]] with which to fill the face of the closed wire. This property only works if {{PropertyData|Make Face}} is {{TRUE}}, and if {{PropertyView|Display Mode}} is "Flat Lines".
* {{PropertyView|Pattern Size}}: specifies the size of the [[Draft Pattern|Draft Pattern]].


{{TitleProperty|Draft}}

* {{PropertyView|Arrow Size|Length}}: specifies the size of the symbol displayed at the end of the wire.
* {{PropertyView|Arrow Type|Enumeration}}: specifies the type of symbol displayed at the end of the wire, which can be {{value|Dot}}, {{value|Circle}}, {{value|Arrow}}, {{value|Tick}} or {{value|Tick-2}}.
* {{PropertyView|End Arrow|Bool}}: specifies whether to show a symbol at the end of the wire, so it can be used as an annotation line.
* {{PropertyView|Pattern|Enumeration}}: specifies the [[Draft_Pattern|Draft Pattern]] with which to fill the face of the closed wire. This property only works if {{PropertyData|Make Face}} is {{TRUE}} and if {{PropertyView|Display Mode}} is {{value|Flat Lines}}.
* {{PropertyView|Pattern Size|Float}}: specifies the size of the [[Draft_Pattern|Draft Pattern]].

<span id="Scripting"></span>
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Programación==
==Programación==
Line 90: Line 131:
</div>
</div>


{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To create a Draft Wire use the {{incode|make_wire}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeWire}} method.


The Wire tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
Wire = makeWire(pointslist, closed=False, placement=None, face=None, support=None)
wire = make_wire(pointslist, closed=False, placement=None, face=None, support=None)
Wire = makeWire(Part.Wire, closed=False, placement=None, face=None, support=None)
wire = make_wire(Part.Wire, closed=False, placement=None, face=None, support=None)
}}
}}


Line 107: Line 149:


Ejemplo:
Ejemplo:

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


doc = App.newDocument()
p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(1000, 1000, 0)
p3 = FreeCAD.Vector(2000, 0, 0)


Wire1 = Draft.makeWire([p1, p2, p3], closed=True)
p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 1000, 0)
Wire2 = Draft.makeWire([p1, 2*p3, 1.3*p2], closed=True)
p3 = App.Vector(2000, 0, 0)
Wire3 = Draft.makeWire([1.3*p3, p1, -1.7*p2], closed=True)

wire1 = Draft.make_wire([p1, p2, p3], closed=True)
wire2 = Draft.make_wire([p1, 2*p3, 1.3*p2], closed=True)
wire3 = Draft.make_wire([1.3*p3, p1, -1.7*p2], closed=True)

doc.recompute()
}}
}}


{{Docnav|[[Draft_Line|Line]]|[[Draft_Fillet|Fillet]]|[[Draft_Module|Draft]]|IconL=Draft_Line.svg |IconC=Workbench_Draft.svg|IconR=Draft_Fillet.svg}}


{{Docnav
{{Draft Tools navi}}
|[[Draft_Line|Line]]
|[[Draft_Fillet|Fillet]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Line.svg
|IconR=Draft_Fillet.svg
|IconC=Workbench_Draft.svg
}}


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

Latest revision as of 05:02, 9 January 2024

Draft Wire

Ubicación en el Menú
Croquis -> Polilínea
Entornos de trabajo
Croquis, Arquitectura
Atajo de teclado por defecto
P L
Introducido en versión
0.7
Ver también
Línea Boceto, BSpline Boceto

Description

Descripción

La herramienta Contorno crea polilíneas (secuencias de líneas formadas por varios segmentos) en el plano de trabajo actual. Toma el Espesor de línea y color previamente definidos en la pestaña de tareas. La herramienta Contorno se comporta como la herramienta Línea, con la excepción de que no termina tras indicar dos puntos.

The corners of a Draft Wire can be filleted (rounded) or chamfered by changing its DatosFillet Radius or DatosChamfer Size respectively. It is also possible to subdivide the edges of a Draft Wire by changing its DatosSubdivisions property.

Create

Usage

See also: Draft Tray, Draft Snap and Draft Constrain.

Utilización

  1. Presiona el botón Contorno, o presiona las teclas W y I
  2. Selecciona un primer punto en la vista 3D, o escribe unas coordenadas
  3. Selecciona puntos adicionales en la vista 3D, o escribe coordenadas
  4. Presiona F o C, o haz doble clic en el último punto, o selecciona el primer punto para terminar o cerrar el contorno. Si el contorno es cerrado, también será una cara, aunque su apariencia sea alámbrica.

Options

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 0.22).

Opciones

  • Si se seleccionan Draft Lineas conectadas al presionar el botón Draft Wire, se convertirán en un Wire y el comando terminara. introduced in version 0.17
  • Presiona F o el botón Terminar para finalizar el contorno, dejándolo abierto
  • Presiona C o el botón Cerrar o selecciona el primer punto para finalizar el contorno, pero haciendo que se cierre añadiendo un último segmento entre el último punto y el primero.
  • Presiona X, Y o Z después de un punto para restringir el siguiente punto con respecto al eje dado.
  • Para introducir coordenadas manualmente, simplemente introduce los números, presiona ENTER entre cada componente X, Y y Z.
  • Presiona R o selecciona la casilla para activar / desactivar el modo Relativo. Si está activado el modo relativo, las coordenadas del siguiente punto son relativas al anterior. En caso contrario, son absolutas, desde el origen de coordenadas (0,0,0).
  • Presiona T o selecciona la casilla para activar / desactivar el modo Continuo. Si está activado el modo continuo, la herramienta Contorno se iniciará después de que termines o cierres el contorno actual, permitiendo que dibujes otro contorno sin necesidad de pulsar el botón de Contorno otra vez.
  • Presiona CTRL mientras dibujas para forzar el ajuste del punto a la ubicación de ajuste más cercana, independientemente de la distancia.
  • Presiona SHIFT mientras dibujas para restringir tu siguiente punto horizontal o verticalmente en relación al último punto indicado.
  • Presiona W o el botón Contorno para eliminar el segmento existente y comenzar el contorno desde el último punto.
  • Presiona CTRL+Z o el botón Deshacer para deshacer el último punto.
  • Presiona I o el botón Relleno para que el Wire se muestre como una cara si esta cerrada.
  • Presiona ESC o el botón Cancelar para abortar el comando Línea actual.
  • Los Wires cerrados, cuando están en el modo de visualización "Líneas planas", pueden mostrar un patrón de sombreado, configurando a continuación la propiedad "Patrón".

Join

Usage

  1. The end points of the Draft Lines and/or Draft Wires to be joined must be exactly coincident. If required first adjust points to ensure that this is the case.
  2. Select two or more Draft Lines and/or Draft Wires.
  3. There are several ways to invoke the command:
    • Press the Draft Wire button.
    • Select the Drafting → Polyline option from the menu.
    • Use the keyboard shortcut: P then L.

Notes

Properties

See also: Property editor.

A Draft Wire object is derived from a Part Part2DObject and inherits all its properties. It also has the following additional properties:

Data

Draft

  • DatosArea (Area): (read-only) specifies the area of the face of the wire. The value will be 0.0 if DatosMake Face is false or the face cannot be created.
  • DatosBase (Link)
  • DatosChamfer Size (Length): specifies the length of the chamfers at the corners of the wire.
  • DatosClosed (Bool): specifies if the wire is closed or not. If the wire is initially open this value is false, setting it to true will draw a line segment to close the wire. If the wire is initially closed this value is true, setting it to false will remove the last line segment and make the wire open.
  • DatosEnd (VectorDistance): specifies the end point of the wire.
  • DatosFillet Radius (Length): specifies the radius of the fillets at the corners of the wire.
  • DatosLength (Length): (read-only) specifies the total length of the wire.
  • DatosMake Face (Bool): specifies if the wire makes a face or not. If it is true a face is created, otherwise only the edges are considered part of the object. This property only works if DatosClosed is true and if the wire does not self-intersect.
  • DatosPoints (VectorList): specifies the points of the wire in its local coordinate system.
  • DatosStart (VectorDistance): specifies the start point of the wire.
  • DatosSubdivisions (Integer): specifies the number of subdivisions for each edge of the wire. If it is 1 each edge will be divided into 2 equal segments. Subdivisions are applied before chamfers and fillets.
  • DatosTool (Link)

View

Draft

  • VistaArrow Size (Length): specifies the size of the symbol displayed at the end of the wire.
  • VistaArrow Type (Enumeration): specifies the type of symbol displayed at the end of the wire, which can be Dot, Circle, Arrow, Tick or Tick-2.
  • VistaEnd Arrow (Bool): specifies whether to show a symbol at the end of the wire, so it can be used as an annotation line.
  • VistaPattern (Enumeration): specifies the Draft Pattern with which to fill the face of the closed wire. This property only works if DatosMake Face is true and if VistaDisplay Mode is Flat Lines.
  • VistaPattern Size (Float): specifies the size of the Draft Pattern.

Programación

La herramienta Contorno se puede utilizar en macros y desde la consola de Python utilizando la siguiente función:

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Wire use the make_wire method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeWire method.

wire = make_wire(pointslist, closed=False, placement=None, face=None, support=None)
wire = make_wire(Part.Wire, closed=False, placement=None, face=None, support=None)
  • Crea un objeto Contorno a partir de la lista de vectores dada o a partir del contorno dado.
    • Si cerrado es True o si el primer y último puntos son idénticos, el contorno es cerrado.
    • Si el modo de cara es True (y el contorno está cerrado), el contorno se mostrará relleno.
  • Se utilizaran el espesor de línea y color actuales.
  • Devuelve el objeto recién creado.

Ejemplo:

import FreeCAD as App
import Draft

doc = App.newDocument()

p1 = App.Vector(0, 0, 0)
p2 = App.Vector(1000, 1000, 0)
p3 = App.Vector(2000, 0, 0)

wire1 = Draft.make_wire([p1, p2, p3], closed=True)
wire2 = Draft.make_wire([p1, 2*p3, 1.3*p2], closed=True)
wire3 = Draft.make_wire([1.3*p3, p1, -1.7*p2], closed=True)

doc.recompute()