Draft BSpline/ro: Difference between revisions

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

{{Docnav|[[Draft_Dimension|Dimension]]|[[Draft_Point|Point]]|[[Draft_Module|Draft]]|IconL=Draft_Dimension.svg |IconC=Workbench_Draft.svg|IconR=Draft_Point.svg }}
{{Docnav
|[[Draft_Polygon|Polygon]]
|[[Draft_CubicBezCurve|CubicBezCurve]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_Polygon.svg
|IconR=Draft_CubicBezCurve.svg
|IconC=Workbench_Draft.svg
}}


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

==Description==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 11: Line 28:
</div>
</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.
The BSpline tool behaves like the [[Draft Wire]] tool, except that each of its segments is curved instead of being a straight line. Use [[Draft WireToBSpline]] to convert one to the other.

The BSpline tool specifies the exact points through which the curve will go; on the other hand the [[Draft BezCurve]] tool uses {{Emphasis|control points}} to define the direction of the curve. To create exact circular or elliptical curves, use [[Draft Arc]] and [[Draft Ellipse]].


[[Image:Draft_bspline_example.jpg|400px]]
[[Image:Draft_bspline_example.jpg|400px]]
Line 19: Line 34:
[[Image:Draft_bspline_example.jpg|400px]]
[[Image:Draft_bspline_example.jpg|400px]]
</div>
</div>

==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">
==Cum se folosește==
==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}}
# 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 [[Draft_Coordinates/ro|coordinate]]
# Click pe primul punct în vizualizarea 3D, sau tastați coordinate
# Click ăe punctele adiționale în vizualizarea 3D, sau tastați [[Draft_Coordinates/ro|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.
# 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>
</div>


==Options==
The spline can be edited by double clicking on the element in the tree view, or by pressing the {{Button|[[Image:Draft Edit.png|16px]] [[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).


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Opțiuni==
==Opțiuni==
* Apăsați {{KEY|F}} or the {{KEY|[[Image:Draft FinishLine.png|12px]] '''[[Draft_FinishLine/ro|Finish]]'''}} button to finish the spline, leaving it open
* Apăsați {{KEY|F}} or the {{KEY|[[Image:Draft FinishLine.png|12px]] '''Finish'''}} button to finish the spline, leaving it open
* Apăsați butonul {{KEY|C}} or the {{KEY|[[Image:Draft CloseLine.png|12px]] '''[[Draft_CloseLine/ro|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 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ă.
* 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.
* Pentru a introduce manual coordonatele, pur și simplu introduceți numerele, apoi apăsați {{KEY|ENTER}} între fiecare componentă X, Y și Z.
Line 41: Line 62:
* 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|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 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]] '''[[Draft_UndoLine/ro|Undo]]'''}} de undo a ultimului 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|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.
* Apăsați tasta {{KEY|ESC}} sau tasta {{KEY|'''Cancel'''}} pentru a întrerupe comanda curentă BSpline.
Line 47: Line 68:
</div>
</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">
<div class="mw-translate-fuzzy">
==Proprietăți==
==Proprietăți==
Line 56: Line 83:
</div>
</div>


See also: [[Property_editor|Property editor]].
A BSpline object shares most properties from a [[Draft Wire]], however, most properties only make sense for a Wire.

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 ===
=== Data ===

* {{PropertyData|Closed}}: 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.
{{TitleProperty|Draft}}
* {{PropertyData|Make Face}}: 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}}.

:{{Emphasis|Note:}} do not set {{PropertyData|Make Face}} to {{TRUE}} if the spline intersects itself, as it won't create a proper face.
* {{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|Parameterization}}: affects the shape of the BSpline.
* {{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 ===
=== View ===

* {{PropertyView|Arrow Size}}: specifies the size of the symbol displayed at the end of the spline.
{{TitleProperty|Draft}}
* {{PropertyView|Arrow Type}}: specifies the type of symbol displayed at the end of the spline, which can be "Dot", "Circle", "Arrow", or "Tick".

* {{PropertyView|End Arrow}}: specifies whether to show a symbol at the last point of the spline, so it can be used as an annotation line.
* {{PropertyView|Pattern}}: specifies a [[Draft Pattern]] with which to fill the face of a closed spline. This property only works if {{PropertyData|Make Face}} is {{TRUE}}, and if {{PropertyView|Display Mode}} is "Flat Lines".
* {{PropertyView|Arrow Size|Length}}: specifies the size of the symbol displayed at the end of the spline.
* {{PropertyView|Pattern Size}}: specifies the size of the [[Draft Pattern]].
* {{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==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 76: Line 114:
</div>
</div>


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.
The BSpline tool can be used in [[macros]] and from the [[Python]] console by using the following function:


{{Code|code=
{{Code|code=
BSpline = makeBSpline(pointslist, closed=False, placement=None, face=None, support=None)
bspline = make_bspline(pointslist, closed=False, placement=None, face=None, support=None)
BSpline = makeBSpline(Part.Wire, closed=False, placement=None, face=None, support=None)
bspline = make_bspline(Part.Wire, closed=False, placement=None, face=None, support=None)
}}
}}


Line 91: Line 129:
</div>
</div>


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

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


p1 = App.Vector(0, 0, 0)
BSpline1 = Draft.makeBSpline([p1, p2, p3], closed=True)
p2 = App.Vector(1000, 1000, 0)
BSpline2 = Draft.makeBSpline([p1, 2*p3, 1.3*p2], closed=True)
p3 = App.Vector(2000, 0, 0)
BSpline3 = Draft.makeBSpline([1.3*p3, p1, -1.7*p2], closed=True)

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_Dimension|Dimension]]|[[Draft_Point|Point]]|[[Draft_Module|Draft]]|IconL=Draft_Dimension.svg |IconC=Workbench_Draft.svg|IconR=Draft_Point.svg }}


{{Docnav
{{Draft Tools navi}}
|[[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}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

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