Draft Trimex: Difference between revisions

From FreeCAD Documentation
(Updated Usage)
Line 48: Line 48:
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# If you have not yet selected an object: select an object in the [[3D_view|3D view]].
# The {{MenuCommand|Trimex}} task panel opens. See [[#Options|Options]] for more information.
# The {{MenuCommand|Trimex}} task panel opens. See [[#Options|Options]] for more information.
# Move the pointer in the [[3D_view|3D view]] so that the preview matches the desired result.

# If require use the modifier keys explained in the [[#Options|Options]].
# Click a point in the 3D view, or enter a distance and press {{KEY|Enter}}.
# Do one of the following:

#* Pick a point in the [[3D_view|3D view]].
<!--T:12-->
#* Enter a {{MenuCommand|Distance}} or an {{MenuCommand|Angle}}. The distance is a delta distance. This option does not work if modifier keys are used.
Trimming or extending is decided from the position of the pointer.
#* Move the pointer over an edge belonging to another object and click when this edge is highlighted, to trim or extend the selected object at an intersection with the (extended) highlighted edge.
* If the line is short it can be extended to approach and cross another line.
* If the line is long and crosses another line, the excess length can be trimmed.
* If the pointer is moved over another object or edge, the trim-extend operation will snap to that object, so that the trimmed or extended line ends exactly at the intersection with the object. This snapping works even without [[Draft Snap|Draft Snap]] modes active.

<!--T:13-->
A [[Draft Wire|Draft Wire]] allows you to trim or extend any of its individual segments, which may affect the entire shape of the wire. In this case, the Trimex tool will work on the line segment that is closer to the pointer. Hold the {{KEY|Shift}} key to keep trimming or extending the current segment independently of the position of the pointer.

<!--T:14-->
When the selected object is a face, the Trimex tool switches to {{Emphasis|extrude}} mode. In extrude mode the extrusion is done in the direction of the normal of the face. For example, if a rectangle lies on the XY plane, it should be extruded in the Z direction. To do this correctly, pressing the {{KEY|Z}} key may be necessary to constrain the distance to the Z direction. Alternatively, hold the {{KEY|Shift}} key to extrude in any direction that is not the normal.


=== Options === <!--T:6-->
=== Options === <!--T:6-->

Revision as of 09:54, 11 June 2021

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Draft Trimex

Menu location
Modification → Trimex
Workbenches
Draft, Arch
Default shortcut
T R
Introduced in version
-
See also
Part Extrude

Description

The Trimex tool trims or extends Draft Lines and Draft Wires so that they end at an intersection with another line or edge.

The Trimex tool also extrudes faces created from closed wires. In this respect, it's similar to Part Extrude and to PartDesign Pad.

Wire segment extended, then wire segment trimmed; face extruded into a solid body

Trim/extend

Usage

  1. Optionally select one object. The object must be a Draft Line, a Draft Wire, a Draft Arc or a Draft Circle (which can only be trimmed). If the selected object is closed it must have its DataMake Face property set to false.
  2. There are several ways to invoke the command:
    • Press the Draft Trimex button.
    • Select the Modification → Trimex option from the menu.
    • Use the keyboard shortcut: T then R.
  3. If you have not yet selected an object: select an object in the 3D view.
  4. The Trimex task panel opens. See Options for more information.
  5. Move the pointer in the 3D view so that the preview matches the desired result.
  6. If require use the modifier keys explained in the Options.
  7. Do one of the following:
    • Pick a point in the 3D view.
    • Enter a Distance or an Angle. The distance is a delta distance. This option does not work if modifier keys are used.
    • Move the pointer over an edge belonging to another object and click when this edge is highlighted, to trim or extend the selected object at an intersection with the (extended) highlighted edge.

Options

The modifier keys mentioned here can be changed. See Draft Preferences.

  • Hold Alt to invert the direction of the operation.
  • Hold Shift to restrict the operation to the current segment.

Example to explain the options: the left edge or the bottom edge of the U-shaped wire was extended

For the following solutions all Draft Snaps were turned off.

  1. The arc was clicked near the bottom left corner of the wire. The longest part of the wire was preserved. This is the default behavior.
  2. Alt was held down while the arc was clicked near the bottom left corner of the wire.
  3. Y was pressed, and while hovering over the left edge Shift was held down and then the arc was clicked. Pressing Y is only required for edges that are more or less parallel to the Y axis.

Extrude

Usage

See also: Draft Snap and Draft Constrain.

  1. It can be helpful to first change the Draft working plane so that it is not coplanar with the face you want to extrude.
  2. Optionally select a single face or an object with a single face.
  3. There are several ways to invoke the command:
    • Press the Draft Trimex button.
    • Select the Modification → Trimex option from the menu.
    • Use the keyboard shortcut: T then R.
  4. If you have not yet selected an object or a face: select an object with a single face in the 3D view.
  5. The Trimex task panel opens. See Options for more information.
  6. To define the extrusion direction and distance do one of the following:
    • Pick a point in the 3D view that does no lie on the same plane as the face.
    • Make sure the pointer is on the correct side of the face in the 3D view and enter a Distance.

Options

The modifier key mentioned here can be changed. See Draft Preferences.

  • Hold Shift to extrude in a direction that is not parallel to the normal of the face.

Preferences

See also: Preferences Editor and Draft Preferences.

  • To change the number of decimals used for the input of the distance: Edit → Preferences... → General → Units → Units settings → Number of decimals.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

There is no Python method to trim objects. To extrude objects use the extrude method of the Draft module.

extrusion = extrude(obj, vector, solid=False)
  • obj is the object to be extruded.
  • vector is the extrusion direction and distance.
  • If solid is True a solid is created instead of a shell.
  • extrusion is returned with the created object.

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

rectangle = Draft.make_rectangle(1500, 500)
doc.recompute()

vector = App.Vector(0, 0, 300)
solid = Draft.extrude(rectangle, vector, solid=True)
doc.recompute()