Draft BSpline/ro: Difference between revisions

From FreeCAD Documentation
(Created page with "Draft BSpline")
 
(Updating to match new version of source page)
 
(44 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Draft BSpline|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft -> BSpline|Shortcut=B S|SeeAlso=[[Draft Wire|Draft Wire]]}}


{{Docnav
==Description==
|[[Draft_Polygon|Polygon]]
The BSpline tool creates a [http://en.wikipedia.org/wiki/B-spline B-Spline curve] from several points in the current [[Draft SelectPlane|work plane]]. It takes the [[Draft Linestyle|linewidth and color]] previously set on the Tasks tab. The BSpline tool behaves exactly like the [[Draft Wire]] tool.
|[[Draft_CubicBezCurve|CubicBezCurve]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Polygon.svg
|IconR=Draft_CubicBezCurve.svg
|IconC=Workbench_Draft.svg
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/ro
|Name=Draft BSpline
|Name/ro=Funcții BSpline
|Workbenches=[[Draft_Workbench/ro|Draft]], [[Arch_Workbench/ro|Arch]]
|MenuLocation=Draft → BSpline
|Shortcut={{KEY|B}} {{KEY|S}}
|SeeAlso=[[Draft Wire/ro|Draft Wire]]
}}
</div>

==Description==

<div class="mw-translate-fuzzy">
== Descriere ==
Instrumentul BSpline creează o curbă [http://en.wikipedia.org/wiki/B-spline B-Spline] din mai multe puncte din actualul [[Draft SelectPlane/ro|work plane]]. Este nevoie de [[Draft Linestyle/ro|linewidth and color]] setată anterior pe fila Activități. Instrumentul BSpline se comportă exact ca instrumentul [[Draft Wire/ro|Draft Wire]].
</div>

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

[[Image:Draft_bspline_example.jpg|400px]]
<div class="mw-translate-fuzzy">
[[Image:Draft_bspline_example.jpg|400px]]
[[Image:Draft_bspline_example.jpg|400px]]
</div>


==How to use==
==Usage==

# Press the {{KEY|[[Image:Draft BSpline.png|16px]] [[Draft BSpline]]}} button, or press {{KEY|B}} then {{KEY|S}} keys
See also: [[Draft_Tray|Draft Tray]], [[Draft_Snap|Draft Snap]] and [[Draft_Constrain|Draft Constrain]].
# Click a first point on the 3D view, or type a [[Draft_Coordinates|coordinate]]

# Click additional point on the 3D view, or type a [[Draft_Coordinates|coordinate]]
<div class="mw-translate-fuzzy">
# Press {{KEY|F}} or {{KEY|C}}, or double-click the last point, or click on the first point to finish or close the spline. If the spline is closed, it will also be a face, even if it appears as wireframe.
==Cum se folosește==
# Apăsați butonul {{KEY|[[Image:Draft BSpline.png|16px]] [[Draft BSpline/ro|Draft BSpline]]}}, sau apăsați tastele {{KEY|B}} apoi {{KEY|S}}
# Click pe primul punct în vizualizarea 3D, sau tastați coordinate
# Click ăe punctele adiționale în vizualizarea 3D, sau tastați coordinate
# Apăsați tastele {{KEY|F}} sau {{KEY|C}} sau faceți dublu clic pe ultimul punct sau faceți clic pe primul punct pentru a termina sau închide curba spline. Dacă curba B spline este închisă, ea va fi de asemenea o fațetă, chiar dacă ea apare ca un cadru de tip wireframe.
</div>


==Options==
==Options==
* Press {{KEY|F}} or the {{KEY|[[Image:Draft FinishLine.png|12px]] '''[[Draft_FinishLine|Finish]]'''}} button to finish the spline, leaving it open
* Press {{KEY|C}} or the {{KEY|[[Image:Draft CloseLine.png|12px]] '''[[Draft_CloseLine|Close]]'''}} button or click on the first point to finish the spline, but making it closed by adding a last segment between the last point and the first one.
* Press {{KEY|X}}, {{KEY|Y}} or {{KEY|Z}} after a point to constrain the next point on the given axis.
* To enter coordinates manually, simply enter the numbers, then press {{KEY|ENTER}} between each X, Y and Z component.
* Press {{KEY|R}} or click the checkbox to check/uncheck the {{KEY|'''Relative'''}} button. If relative mode is on, the coordinates of the next point are relative to the last one. If not, they are absolute, taken from the (0,0,0) origin point.
* Press {{KEY|T}} or click the checkbox to check/uncheck the {{KEY|'''Continue'''}} button. If continue mode is on, the BSpline tool will restart after you finish or close it, allowing you to draw another one without pressing the BSpline button again.
* Press {{KEY|CTRL}} while drawing to force [[Draft_Snap|snapping]] your point to the nearest snap location, independently of the distance.
* Press {{KEY|SHIFT}} while drawing to [[Draft_Constrain|constrain]] your next point horizontally or vertically in relation to the last one.
* Press {{KEY|W}} or press the {{KEY|[[Image:Draft Wipe.png|12px]] '''Wipe'''}} button to remove the existing segments and start the spline from the last point.
* Press {{KEY|CTRL}}+{{KEY|Z}} or press the {{KEY|[[Image:Draft UndoLine.png|12px]] '''[[Draft_UndoLine|Undo]]'''}} button to undo the last point.
* Press {{KEY|I}} or the {{KEY|'''Filled'''}} button to have the spline to appear as a face after it has been closed. This simply sets the View->Property of the Wire to "Flat lines" or "Wireframe", so it can easily be changed later.
* Press {{KEY|ESC}} or the {{KEY|'''Cancel'''}} button to abort the current BSpline command.
* BSplines, when in "Flat Lines" display mode, can display a hatch pattern, by setting their "Pattern" property below.


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).
==Properties==

* {{PropertyData|Closed}}: Specifies if the spline is closed or not
<div class="mw-translate-fuzzy">
* {{PropertyView|End Arrow}}: Shows an arrow symbol at the last point of the spline, so it can be used as an annotation leader line
==Opțiuni==
* {{PropertyView|Pattern}}: Specifies a hatch pattern to fill the wire with
* Apăsați {{KEY|F}} or the {{KEY|[[Image:Draft FinishLine.png|12px]] '''Finish'''}} button to finish the spline, leaving it open
* {{PropertyView|Pattern Size}}: Specifies the size of the hatch pattern
* Apăsați butonul {{KEY|C}} or the {{KEY|[[Image:Draft CloseLine.png|12px]] '''Close'''}} sau click pe primul punct pentru a finaliza curba Spline, dar care o închid prin adăugarea unui ultim segment între ultimul punct și primul punct.
* Apăsați tasta {{KEY|X}}, {{KEY|Y}} sau {{KEY|Z}} după un punct pentru a constrânge următorul punct de pe axa dată.
* Pentru a introduce manual coordonatele, pur și simplu introduceți numerele, apoi apăsați {{KEY|ENTER}} între fiecare componentă X, Y și Z.
* Apăsați tasta {{KEY|R}} sau click pe checkbox pentru a bifa/debifa butonul {{KEY|'''Relative'''}}.Dacă modul relativ este activ, coordonatele punctului următor sunt relativ la ultima. Dacă nu, ele sunt absolute, luate din punctul de origine (0,0,0).
* Apăsați tasta {{KEY|T}} sau click pe checkbox pentru a bifa/debifa butonul {{KEY|'''Continue'''}}. Dacă modul continuare este activat, instrumentul BSpline se va reporni după finalizarea sau închiderea acestuia, permițându-vă să desenați altul fără să apăsați din nou butonul BSpline.
* Apăsați tasta {{KEY|CTRL}} în timp ce desenați pentru a forța punctul [[Draft_Snap/ro|snapping]] punctul dvs. către cea mai apropiată locație, independent de distanța.
* Apăsați tasta {{KEY|SHIFT}} în timp ce desenați [[Draft_Constrain/ro|constrain]] punct dvs următor orizontal sau vertical în relație cu ultimul .
* Apăsați tasta {{KEY|W}} sau apăsați butonul {{KEY|[[Image:Draft Wipe.png|12px]] '''Wipe'''}} pentru a șterge segmentele existente și să demarați funcția Spline de la ultimul punct.
* Apăsați combinația de taste {{KEY|CTRL}}+{{KEY|Z}} sau apăsțai butonul {{KEY|[[Image:Draft UndoLine.png|12px]] '''Undo'''}} de undo a ultimului punct.
* Apăsați tasta {{KEY|I}} sau apăsați butonul {{KEY|'''Filled'''}} pentru a avea funcția spline umplută cu o fațetă după ce a fost închisă.
* Apăsați tasta {{KEY|ESC}} sau tasta {{KEY|'''Cancel'''}} pentru a întrerupe comanda curentă BSpline.
* Planele BS, atunci când sunt în modul de afișare "Flat Lines", pot afișa un model de hașurare, prin setarea proprietății "Pattern" de mai jos.
</div>

==Notes==

* A Draft BSpline can be edited with the [[Draft_Edit|Draft Edit]] command.
* A Draft BSpline can be converted to a [[Draft_Wire|Draft Wire]] with the [[Draft_WireToBSpline|Draft WireToBSpline]] command.

<span id="Properties"></span>
<div class="mw-translate-fuzzy">
==Proprietăți==
* {{PropertyData/ro|Closed}}: Specifică dacă curba spline este închisă sau nu
* {{PropertyData/ro|Make Face}}: Umple curba spline cu o fațetă
* {{PropertyView/ro|End Arrow}}: Afișează un simbol tp săgeată la ultimul punct al curbei spline, astfel încât este folosit ca linie lider de adnotare
* {{PropertyView/ro|Pattern}}: Specificați modelul hașurii cu care se va umple filamentul
* {{PropertyView/ro|Pattern Size}}: Specificați mărimea modelului de hașurare
</div>

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

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

=== Data ===

{{TitleProperty|Draft}}

* {{PropertyData|Area|Area}}: (read-only) specifies the area of the face of the spline. The value will be {{value|0.0}} if {{PropertyData|Make Face}} if {{FALSE}} or the face cannot be created.
* {{PropertyData|Closed|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.
* {{PropertyData|Make 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 {{PropertyData|Closed}} is {{TRUE}} and if the spline does not self-intersect.
* {{PropertyData|Parameterization|Float}}: affects the shape of the spline.
* {{PropertyData|Points|VectorList}}: specifies the points of the spline in its local coordinate system.

=== View ===

{{TitleProperty|Draft}}

* {{PropertyView|Arrow Size|Length}}: specifies the size of the symbol displayed at the end of the spline.
* {{PropertyView|Arrow Type|Enumeration}}: specifies the type of symbol displayed at the end of the spline, 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 spline, 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 spline. 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]].


==Scripting==
==Scripting==
The BSpline tool can by used in [[macros]] and from the python console by using the following function:


<div class="mw-translate-fuzzy">
<syntaxhighlight>
== Script-Programre ==
makeBSpline (pointslist,[closed],[placement])
Unealta BSpline poate fi folosită în [[macros/ro|macro-uri]] şi de la consola Python cu ajutorul funcţiei următoare:
</syntaxhighlight>
</div>
* Creates a B-Spline object from the given list of vectors.
* If closed is True or first and last points are identical, the wire is closed.
* If face is true (and the bspline is closed), the bspline will appear filled.
* Instead of a list of points, you can also pass a Part Wire.
* Returns the newly created object.


To create a Draft BSpline use the {{incode|make_bspline}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makeBSpline}} method.
Example:


{{Code|code=
<syntaxhighlight>
bspline = make_bspline(pointslist, closed=False, placement=None, face=None, support=None)
import FreeCAD,Draft
bspline = make_bspline(Part.Wire, closed=False, placement=None, face=None, support=None)
p1 = FreeCAD.Vector(0,0,0)
}}
p2 = FreeCAD.Vector(1,1,0)
p3 = FreeCAD.Vector(2,0,0)
Draft.makeBSpline([p1,p2,p3],closed=True)


<div class="mw-translate-fuzzy">
</syntaxhighlight>
* Creează un obiect B-Spline din lista de vectori dați.
{{clear}}
* Dacă închis este True sau primul și ultimul pucnt sunt identice, filamentul este îchis.
<languages/>
* Dacă face este True (și curba BSpline este închisă), Curba B spline va apărea ca fiind umplută.
* În loc de o listă de puncte, puteți să mergeți și la conturul din Part Wire.
* Returnează obiectul noi creat.
</div>

<div class="mw-translate-fuzzy">
Exempluː
</div>

{{Code|code=
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()
}}


{{Docnav
|[[Draft_Polygon|Polygon]]
|[[Draft_CubicBezCurve|CubicBezCurve]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Polygon.svg
|IconR=Draft_CubicBezCurve.svg
|IconC=Workbench_Draft.svg
}}

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

Latest revision as of 04:56, 9 January 2024

Funcții BSpline

poziția meniului
Draft → BSpline
Ateliere
Draft, Arch
scurtătură
B S
Prezentat în versiune
-
A se vedea, de asemenea,
Draft Wire

Description

Descriere

Instrumentul BSpline creează o curbă B-Spline din mai multe puncte din actualul work plane. Este nevoie de linewidth and color setată anterior pe fila Activități. Instrumentul BSpline se comportă exact ca instrumentul Draft Wire.

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.

Cum se folosește

  1. Apăsați butonul Draft BSpline, sau apăsați tastele B apoi S
  2. Click pe primul punct în vizualizarea 3D, sau tastați coordinate
  3. Click ăe punctele adiționale în vizualizarea 3D, sau tastați coordinate
  4. Apăsați tastele F sau C sau faceți dublu clic pe ultimul punct sau faceți clic pe primul punct pentru a termina sau închide curba spline. Dacă curba B spline este închisă, ea va fi de asemenea o fațetă, chiar dacă ea apare ca un cadru de tip wireframe.

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).

Opțiuni

  • Apăsați F or the Finish button to finish the spline, leaving it open
  • Apăsați butonul C or the Close sau click pe primul punct pentru a finaliza curba Spline, dar care o închid prin adăugarea unui ultim segment între ultimul punct și primul punct.
  • Apăsați tasta X, Y sau Z după un punct pentru a constrânge următorul punct de pe axa dată.
  • Pentru a introduce manual coordonatele, pur și simplu introduceți numerele, apoi apăsați ENTER între fiecare componentă X, Y și Z.
  • Apăsați tasta R sau click pe checkbox pentru a bifa/debifa butonul Relative.Dacă modul relativ este activ, coordonatele punctului următor sunt relativ la ultima. Dacă nu, ele sunt absolute, luate din punctul de origine (0,0,0).
  • Apăsați tasta T sau click pe checkbox pentru a bifa/debifa butonul Continue. Dacă modul continuare este activat, instrumentul BSpline se va reporni după finalizarea sau închiderea acestuia, permițându-vă să desenați altul fără să apăsați din nou butonul BSpline.
  • Apăsați tasta CTRL în timp ce desenați pentru a forța punctul snapping punctul dvs. către cea mai apropiată locație, independent de distanța.
  • Apăsați tasta SHIFT în timp ce desenați constrain punct dvs următor orizontal sau vertical în relație cu ultimul .
  • Apăsați tasta W sau apăsați butonul Wipe pentru a șterge segmentele existente și să demarați funcția Spline de la ultimul punct.
  • Apăsați combinația de taste CTRL+Z sau apăsțai butonul Undo de undo a ultimului punct.
  • Apăsați tasta I sau apăsați butonul Filled pentru a avea funcția spline umplută cu o fațetă după ce a fost închisă.
  • Apăsați tasta ESC sau tasta Cancel pentru a întrerupe comanda curentă BSpline.
  • Planele BS, atunci când sunt în modul de afișare "Flat Lines", pot afișa un model de hașurare, prin setarea proprietății "Pattern" de mai jos.

Notes

Proprietăți

  • DATEClosed: Specifică dacă curba spline este închisă sau nu
  • DATEMake Face: Umple curba spline cu o fațetă
  • VEDEREEnd Arrow: Afișează un simbol tp săgeată la ultimul punct al curbei spline, astfel încât este folosit ca linie lider de adnotare
  • VEDEREPattern: Specificați modelul hașurii cu care se va umple filamentul
  • VEDEREPattern Size: Specificați mărimea modelului de hașurare

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

Draft

  • DateArea (Area): (read-only) specifies the area of the face of the spline. The value will be 0.0 if DateMake Face if false or the face cannot be created.
  • DateClosed (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.
  • DateMake 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 DateClosed is true and if the spline does not self-intersect.
  • DateParameterization (Float): affects the shape of the spline.
  • DatePoints (VectorList): specifies the points of the spline in its local coordinate system.

View

Draft

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

Scripting

Script-Programre

Unealta BSpline poate fi folosită în macro-uri şi de la consola Python cu ajutorul funcţiei următoare:

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)
  • Creează un obiect B-Spline din lista de vectori dați.
  • Dacă închis este True sau primul și ultimul pucnt sunt identice, filamentul este îchis.
  • Dacă face este True (și curba BSpline este închisă), Curba B spline va apărea ca fiind umplută.
  • În loc de o listă de puncte, puteți să mergeți și la conturul din Part Wire.
  • Returnează obiectul noi creat.

Exempluː

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()