Borrador BSpline

From FreeCAD Documentation
Revision as of 09:45, 4 August 2021 by Maker (talk | contribs) (Created page with "==Descripción==")

Draft BSpline

Ubicación en el Menú
Croquis → BSpline
Entornos de trabajo
Croquis, Arquitectura
Atajo de teclado por defecto
B S
Introducido en versión
-
Ver también
Contorno

Descripción

Descripción

La herramienta BSpline crea una curva B-Spline a partir de varios puntos en el plano de trabajo actual. Toma el espesor de línea y color previamente establecidos en la pestaña de tareas. La herramienta BSpline se comporta exactamente como la herramienta Contorno.

The Draft BSpline command specifies the exact points through which the curve will pass. The Draft BezCurve and the Draft CubicBezCurve commands, on the other hand, use control points to define the position and curvature of the spline.

Usage

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

Utilización

  1. Presiona el botón BSpline, o presiona las teclas B y S
  2. Designa un primer punto en la vista 3D, o escribe unas coordenadas
  3. Designa un punto adicional en la vista 3D, o escribe unas coordenadas
  4. Presiona F o C, o haz doble clic en el último punto, o clic en el primer punto para terminar o cerrar la BSpline. Si la spline está cerrada, será también una cara, incluso aunque se muestre en estructura 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.

Opciones

  • Presiona F o el botón Terminar para terminar la spline, dejándola abierta
  • Presiona C o el botón Cerrar o designa el primer punto para finalizar la spline, 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 punto siguiente sobre el eje dado.
  • Para introducir coordenadas manualmente, simplemente introduce los números y presiona ENTER entre cada componente X, Y y Z.
  • Presiona R o selecciona la casilla para activar/desactivar el botón Relativas. Si el modo relativas está activado, las coordenadas del siguiente punto son relativas al anterior. Si no, son absolutas, desde el origen de coordenadas (0,0,0).
  • Presiona T o selecciona la casilla para activar/desactivar el botón Continuar. Si el modo continuar está activado, la herramienta BSpline se reiniciará después de terminar, permitiendo que dibujes otra sin necesidad de volver a pulsar el botón de BSpline.
  • Presiona CTRL mientras dibujas para forzar el ajuste de tu 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.
  • Presiona W o el botón Limpiar para eliminar segmentos existentes e iniciar la spline desde el último punto.
  • Presiona CTRL+Z o el botón Deshacer para deshacer el último punto.
  • Presiona I o el botón Rellenado para que la spline se muestre como una cara después de cerrarse. Esto simplemente establece las propiedades de visualización del contorno como "líneas planas" o "alámbrica", de modo que se puedan cambiar de forma sencilla después.
  • Presiona ESC o el botón Cancelar para abortar el comando BSpline actual.

Notes

Preferences

See also: Preferences Editor and Draft Preferences.

  • To change the number of decimals used for the input of coordinates: Edit → Preferences... → General → Units → Units settings → Number of decimals.
  • To change the initial value of filled mode: Edit → Preferences... → Draft → General settings → Draft tools options → Fill objects with faces whenever possible. Changing the filled mode in a task panel will override this preference for the current FreeCAD session.

Propiedades

  • DatosClosed: Especifica si la spline está cerrada o no
  • VistaEnd Arrow: Muestra un símbolo de flecha en el último punto de la spline, de modo que se puede utilizar como una anotación con línea directriz

See also: Property editor.

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

Data

  • DatosArea (Area): (read-only) specifies the area of the face of the spline. The value will be 0.0 if DatosMake Face if false or the face cannot be created.
  • DatosClosed (Bool): specifies if the spline is closed or not. If the spline is initially open this value is false, setting it to true will draw a curve segment to close the spline. If the spline is initially closed this value is true, setting it to false will remove the last curve segment and make the spline open.
  • DatosMake Face (Bool): specifies if the spline makes a face or not. If it is true a face is created, otherwise only the perimeter is considered part of the object. This property only works if DatosClosed is true and if the spline does not self-intersect.
  • DatosParameterization (Float): affects the shape of the spline.
  • DatosPoints (VectorList): specifies the points of the spline in its local coordinate system.

View

  • VistaArrow Size (Length): specifies the size of the symbol displayed at the end of the spline.
  • VistaArrow Type (Enumeration): specifies the type of symbol displayed at the end of the spline, which can be Dot, Circle, Arrow, Tick or Tick-2.
  • VistaEnd Arrow (Bool): specifies whether to show a symbol at the end of the spline, so it can be used as an annotation line.
  • VistaPattern (Enumeration): specifies the Draft Pattern with which to fill the face of the closed spline. 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.

Scripting

Archivos de guión

La herramienta BSpline puede utilizarse en macros y desde la consola de Python utilizando la siguiente función:

To create a Draft BSpline use the make_bspline method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeBSpline method.

bspline = make_bspline(pointslist, closed=False, placement=None, face=None, support=None)
bspline = make_bspline(Part.Wire, closed=False, placement=None, face=None, support=None)
  • Crea un objeto B-Spline a partir de la lista de vectores dada.
  • Si closed es True o si el primer y último punto son idénticos, el contorno es cerrado.
  • Si face es true (y la BSpline está cerrada), la BSpline se mostrará rellena.
  • En lugar de una lista de puntos, también puedes pasar un contorno de pieza.
  • 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)

spline1 = Draft.make_bspline([p1, p2, p3], closed=False)
spline2 = Draft.make_bspline([p1, 2*p3, 1.3*p2], closed=False)
spline3 = Draft.make_bspline([1.3*p3, p1, -1.7*p2], closed=False)

doc.recompute()