Rysunek Roboczy: Odsunięcie

From FreeCAD Documentation
Revision as of 15:30, 12 June 2021 by Kaktus (talk | contribs) (Created page with "Narzędzie '''Odsunięcie''' może być używane w makrodefinicjach i z konsoli Python za pomocą następującej funkcji:")
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Rysunek Roboczy: Odsunięcie

Lokalizacja w menu
Modyfikacja → Odsunięcie
Środowisko pracy
Rysunek Roboczy, Architektura
Domyślny skrót
O S
Wprowadzono w wersji
-
Zobacz także
Skala, Odsunięcie 2D

Opis

Narzędzie Odsunięcie przesuwa zaznaczony obiekt o zadaną odległość (przesunięcie) w kierunku prostopadłym względem siebie.

Zazwyczaj narzędzie to jest używane w trybie kopiowania do tworzenia przesuniętych kopii linii bazowej z pozostawieniem tej linii w tym samym miejscu. Odsunięte kopie są skalowanymi wersjami oryginalnego obiektu. Aby utworzyć inne skalowane kopie użyj funkcji Skala. Aby utworzyć dokładne kopie z przesunięciem na odległość, użyj funkcji Przesuń.

Odsunięcie linii o określoną odległość od jednej z jej krawędzi

Użycie

  1. Select the object that you wish to offset.
  2. Press the Draft Offset button, or press O then S keys. If no object is selected, you will be invited to select one.
  3. Click a point on the 3D view, or type in a distance.

The distance used to create the offset is perpendicular to one of the edges of the original shape, depending on the position of the pointer. If the pointer is moved closer to another edge, this edge now becomes the reference for the distance. Hold the Shift key to keep the current reference edge despite moving the pointer closer to other edges.

Opcje

  • Press P or click the checkbox to toggle copy mode. If copy mode is on, the Offset tool will keep the original shape in its place but will make a scaled copy at the chosen point.
  • Hold Alt while picking the point to also toggle copy mode. Keeping Alt pressed will allow you to continue placing offset copies; release Alt to finish the operation and see all offset shapes.
  • Click the "OCC-style" checkbox to toggle OCC mode. This will create an offset from both sides of an line segment, which will produce a specially closed shape with rounded edges at the ends of the segments.
Note: with this style the original segments will be removed, so use copy mode to preserve the original edges.
  • Hold Ctrl while offsetting to force snapping your point to the nearest snap location, independently of the distance.
  • Hold Shift to keep the offset distance referred to the current segment, and avoid picking another reference.
  • Press Esc or the Close button to abort the current command; offset copies already placed will remain.

Tworzenie skryptów

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

Narzędzie Odsunięcie może być używane w makrodefinicjach i z konsoli Python za pomocą następującej funkcji:

Offsetobj = offset(obj, delta, copy=False, bind=False, sym=False, occ=False)
  • Offsets the given obj wire by applying the given delta, defined as a vector, to its first vertex.
  • If copy is True another object is created instead of offsetting the original object.
  • If bind is True, and provided the wire object is open, the original and the offset wire will be tied at their endpoints, forming a face.
    • If sym is True, bind must be True as well, and the offset is made on both sides of the wire, the total width being the length of the given vector.
  • If occ is True, it will use OCC-style offsetting: it will offset from both sides, then tie the new wires together, and round the corners.
  • Offsetobj is returned with the original offset object, or with the new copy.

Przykład:

import FreeCAD, Draft

p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(1500, 2000, 0)
p3 = FreeCAD.Vector(4000, 0, 0)

Wire = Draft.makeWire([p1, p2, p3])

vector = FreeCAD.Vector(0, 500, 0)
Offset_1 = Draft.offset(Wire, vector, copy=True)
Offset_2 = Draft.offset(Wire, 3*vector, copy=True)
Offset_3 = Draft.offset(Wire, 6*vector, copy=True)
Offset_4 = Draft.offset(Wire, 9*vector, copy=True)
Offset_5 = Draft.offset(Wire, 1.5*vector, copy=True, occ=True)