Pracovný stôl Náčrtník sa vo FreeCADe používa na tvorbu 2D geometrie, ktorú následne využijete v
na pracovnom stole Dizajn dielca,
pracovnom stole Arch a iných pracovných stoloch. Vo všeobecnosti sa za východiskový bod pre väčšinu CAD modelov považuje 2D náčrt, pretože ten dokážeme „vytiahnuť“ a vytvoriť tak 3D tvar; navyše je možné 2D náčrty okrem predtým vytvorených 3D tvarov použiť aj na vytvorenie ďalších prvkov, ako sú kapsy, ryhy alebo výlisky. Spolu s booleanovskými operáciami definovanými na
pracovnom stole Diel tvorí Náčrtník základ konštruktívnej geometrie telies (CSG) - spôsobu tvorby telies. Okrem toho s operáciami
pracovného stola Dizajn dielu tvorí Náčrtník tiež základ metodológie úpravy prvkov pri tvorbe telies.
Together with boolean operations defined in the Part Workbench, the Sketcher Workbench, or "The Sketcher" for short, forms the basis of the constructive solid geometry (CSG) method of building solids. Together with
PartDesign Workbench operations, it also forms the basis of the feature editing methodology of creating solids. But many other workbenches use sketches as well.
Pracovný stôl Náčrtník obsahuje "väzby", vďaka ktorým dokážete pomocou presných geometrických definícií ako dĺžky, uhla a vzťahov (vodorovnosť, zvislosť, kolmosť atď.) určiť umiestnenie 2d tvarov. Riešiteľ väzieb vypočíta rozsah väzieb 2D geometrie a poskytuje interaktívne prehliadanie stupňov voľnosti náčrtu.
Náčrtník neslúži na tvorbu 2D výkresov. Akonáhle boli náčrty použité na vytvorenie prvku telesa, sú automaticky skryté. Väzby sú viditeľné iba v upravovacom režime náčrtu.
Plne zaväzbený náčrt
Namiesto rozmerov sú väzby používané na obmedzenie stupňov voľnosti objektu. Napríklad čiara bez väzieb má 4 stupne voľnosti (skrátene SV, angl. DOF): môže byť posúvaná vodorovne alebo zvislo, môže byť natiahnutá a môže byť otočená.
Použitie vodorovnej alebo zvislej väzby alebo väzby uhla čiary (vzhľadom na inú čiaru alebo jednu z osí) obmedzí jej schopnosť otáčania, takže jej zostanú 3 stupne voľnosti. Zamknutie jedného z jej dvoch bodov vzhľadom na začiatok súradníc odstráni ďalšie 2 stupne voľnosti. A nakoniec použitie väzby rozmeru odstráni posledný stupeň voľnosti. Po týchto úkonoch je čiara považovaná za "plne zaväzbenú".
Objekty môžu byť takisto zaväzbené medzi sebou. Dve čiary môžete spojiť pomocou jedného z ich bodov vďaka väzbe splynutia bodov. Môže takisto medzi nimi byť nastavený úhol, alebo môžu nastavené ako kolmé. Čiara môže byť dotyčnicou oblúka alebo kruhu apod. Komplexný náčrt s viacerými objektami bude mať viac možných riešení a jeho "plné zaväzbenie" znamená, že bolo dosiahnuté práve jedno z týchto možných riešení v závislosti od použitých väzieb.
Existujú dva typy väzieb: geometrické a rozmerové. Sú opísané nižšie v časti 'Nástroje'.
introduced in 1.1: The label of dimensional constraints in the sketch identifies their state: reference dimensions are enclosed in parentheses, dimensions controlled by an expression have a (ƒ𝑥) suffix, and deactivated dimensions are struck through.
When a driving dimensional constraint is created, and if the Ask for value after creating a dimensional constraint preference is selected (default), a dialog opens to edit its value.
You can enter a numerical value or an expression, and it is possible to name the constraint to facilitate its use in other expressions. Check the Reference checkbox to switch the constrain to reference mode. introduced in 26.3: For radius and diameter dimensions it is possible to switch between one and the other. Note that with the Dimension tool this can also be accomplished with the M key.
introduced in 26.3: When a dimensional constraint whose value is controlled by an expression, is hovered in the sketch or the Constraints section of the Sketcher Dialog, and no sketcher tool is active, a tooltip displays that expression.
To edit the value of an existing dimensional constraint do one of the following:
Dimensional constraints can be repositioned in the 3D View by dragging. Hold down the left mouse button over the constraint value and move the mouse. The symbols of geometric constraints are positioned automatically and cannot be moved.
Dimension and constraint tools running in Continue Mode can directly reference edges and vertices outside the sketch. If not yet available, projected external geometry is created automatically, and this is used as the dimension or constraint operand. The external geometry is created as construction geometry. The referenced object(s) must belong to the same geometric parent (for example the same Std Part or PartDesign Body) as the sketch, or sketch and object(s) must all be in the global space.
When a sketch has only one dimension that defines its scale, entering a new numerical value for that dimension can scale the entire sketch about its origin. This preserves the overall proportions when you first size a roughly drawn sketch. For example, changing a rectangle's only length dimension from 10 mm to 20 mm doubles both its width and height. Angle constraints do not count as scale-defining dimensions. The view is adjusted along with the geometry, so the sketch can appear to keep the same size on screen. The Scale upon first constraint preference controls this behavior.
To create a sketch that can be used as a profile for generating solids certain rules must be followed:
Invalid sketches:
1. Open contour (free endpoints highlighted by the Validate Sketch tool)
2. Intersecting contours
3. Duplicate edges (endpoints of overlapping edges highlighted by the Validate Sketch tool)
4. T-connections
These rules do not apply to construction geometry (default color blue), which is not shown outside edit mode, or if the sketch is used for a different purpose. Depending on the workbench and the tool that will use the profile sketch, additional restrictions may apply.
If the DataMake Internals property of a sketch is set to true internal faces are generated based on the edges in the sketch. These faces can be selected as closed profiles for operations. Intersecting contours and T-connections are allowed, they just result in additional faces.
Nástroje pracovného stola Náčrtník sa nachádzajú v menu Náčrt, ktoré sa objaví po nahraní pracovného sola Náčrtník.
Some tools are also available from the 3D View context menu while a sketch is in edit mode, or from the context menus of the Sketcher Dialog.
If a sketch is in edit mode the Structure toolbar is hidden as none of its tools can then be used.
Tu sú uvedené nástroje pre tvorbu objektov.
Väzby sa používajú na definovanie dĺžok, nastavenie pravidiel medzi súčasťami náčrtu a na ukotvenie náčrtu vzhľadom na vodorovnú a zvislú os. Niektoré väzby vyžadujú Pomocné väzby.
The Sketcher Workbench has several drawing aids and other features that can help when creating geometry and applying constraints.
There are two continue modes: Geometry creation "Continue Mode" and Constraint creation "Continue Mode". If these are checked (default) in the preferences, related tools will restart after finishing. To exit a continuous tool press Esc or the right mouse button. This must be repeated if a continuous geometry tool has already received input. You can also exit a continuous tool by starting another geometry or constraint creation tool. Note that pressing Esc if no tool is active will exit sketch edit mode. Uncheck the Esc key can leave sketch edit mode preference if you often inadvertently press Esc too many times.
In sketches that have Auto constraints checked (default) several constraints are applied automatically when creating geometry or (introduced in 26.3) dragging existing points. The icon of a proposed automatic constraint is shown next to the cursor when it is placed correctly. Left-clicking, or ending the drag operation by releasing the Left mouse button, will then apply that constraint. This is a per-sketch setting that can be changed in the Sketcher Dialog or by changing the ViewAutoconstraints property of the sketch.
There is a fine-tuning parameter to control the auto constraint delay when dragging geometry.
The following constraints are applied automatically:
To create auto constraints along extended arcs circular helpers can be shown.
Lines are automatically extended with helper lines if the cursor is positioned correctly. This allows creating point-on-object auto constraints along the line.
Using a directional helper line to create a perpendicular auto constraint
If the Show directional autoconstraint helpers preference is selected (default), tangential, or perpendicular and parallel helper lines referencing a target edge can be shown while using the Polyline tool (only when creating line segments) and
Line tool.
Note that straight target edges that are horizontal or vertical are ignored.
It is possible to snap to grid lines and grid intersection, and to snap to edges of geometry and midpoints of lines and arcs, and to certain angles. Please note that snapping does not produce constraints in and of itself. For example, only if Auto constraints is switched on will snapping to an edge produce a point-on-object constraint. But just picking a point on the edge would then have the same result.
Depending on the selected option in the preferences only the dimensional On-View-Parameters or both the dimensional and the positional On-View-Parameters can be enabled. Positional parameters allow the input of exact coordinates, for example the center of a circle, or the start point of a line. Dimensional parameters allow the input of exact dimensions, for example the radius of a circle, or the length and angle of a line. On-View-Parameters are not available for all tools.
Determining the center point of a circle with the positional parameters enabled
Determining the radius of a circle with the dimensional parameters enabled
If values are entered and confirmed by pressing Enter or Tab, related constraints are added automatically. If two parameters are displayed at the same time, for example the X- and Y-coordinate of a point, it is possible to enter one value and pick a point to define the other. Depending on the object additional constraints may be required to fully constrain it. Constraints resulting from On-View-Parameters take precedence over those that may result from Auto constraints.
introduced in 26.3 If an OVP input has the focus you can hold down Alt to send key strokes to the 3D View instead.
Arc created by entering all On-View-Parameters with resulting automatically created constraints
If the Show coordinates next to the cursor while editing preference is checked (default), the parameters of the current geometry tool (coordinates, radius, or length and angle) are displayed next to the cursor. This is deactivated while On-View-Parameters are shown.
While a sketch is in edit mode several selection methods can be used. introduced in 26.3: For all methods selection filters are taken into account.
As elsewhere in FreeCAD, an element can be selected in the 3D View with a single left mouse click. But there is no need to hold down the Ctrl key when selecting multiple elements. Holding down that key is possible though and has the advantage that you can miss-click without losing the selection. Edges, points and constraints can be selected in this manner.
Box selection in the 3D View works without using Std BoxSelection or Std BoxElementSelection:
You can box-select edges and points, constraints cannot be box-selected.
Double-clicking an edge in the 3D View will select all edges directly and indirectly connected with that edge via endpoints. There is no need for the edges to be connected with coincident constraints, endpoints need only have the same coordinates.
Edges and points can also be selected from the Elements section of the Sketcher Dialog, and constraints from the Constraints section of that dialog.
To select everything within a sketch, use the standard keyboard shortcut Ctrl+A or the Edit → Select All option from the menu.
introduced in 1.1: To drag several elements together, select them using any selection method, hold down the left mouse button over one of the selected elements, move the mouse, then release the button to finish the drag. Existing constraints remain in effect and can limit or prevent the movement. Fully constrained geometry cannot be dragged. Any selected external geometry is excluded from the drag.
The standard keyboard shortcuts, Ctrl+C, Ctrl+X and Ctrl+V, can be used to copy, cut and paste selected Sketcher geometry including related constraints. But these tools are also available from the Sketch → Sketcher Tools menu. They can be used within the same sketch but also between different sketches or separate instances of FreeCAD. Since the data is copied to the clipboard in the form of Python code, it can be used in other ways too (e.g. shared on the forum).
Geometry created by External Projection and External Intersection can be used with Offset, Move / Array Transform, Rotate / Polar Transform, Scale and Mirror. Both external construction geometry and external defining geometry are accepted.
If the operation changes or removes the original geometry, its external reference is removed from the sketch. Removing a face reference removes all external edges created from that face. The source object remains unchanged. To retain a reference alongside the result, use a tool option that keeps the originals.
Každý CAD používateľ si priebežne vytvára vlastný pracovný postup, ale existujú určité osvedčené postupy, ktoré je dobré zachovávať.
The phenomenon that a fully constrained sketch, usually after a major change to one of its dimensions, reaches an unintended new state is known as "flipping". In the example below, changing one dimension completely changes the shape of the sketch. Note that the sketch with the new shape is still fully constrained.
Original sketch (left), and the same sketch after increasing the 20mm value to 1000mm (right)
This is not always practical, but changing dimension values in smaller increments can work.
The LevenbergMarquardt solver, which is not the default solver, is known to be less prone to flipping. See Sketcher Dialog for more information.
Using horizontal and vertical dimensions instead of distance dimensions or equal constraints can prevent flipping. Points constrained by these dimensions will only switch places if the sign of their value is changed. In the image above the added (orange) dimensional constraints are linked to the original dimensions via expressions.
Using angle dimensions instead of horizontal and vertical constraints can also work. The angle between edges constrained by angle dimensions will not change. 180° will not become 0°, 90° will not become 270°, etc. In the image all horizontal and vertical constraints have been replaced, but just replacing two is already effective here.
Stránka Skriptovanie v Náčrtníku obsahuje príklady vytvárania väzieb pomocou skriptov v jazyku Python.
For some ideas of what can be achieved with Sketcher tools, have a look at: Sketcher Examples.