Pracovný stôl Náčrtník
Úvod
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.
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.
Plne zaväzbený náčrt
Základy používania väzieb náčrtu
Pre lepšie pochopenie fungovania Náčrtníka môže pomôcť porovnanie s "tradičným" spôsobom rysovania.
Tradičné rysovanie
Tradičné rysovanie v CAD programoch používa podobné techniky, ako technické výkresy. Jednotlivé pohľady sú kreslené manuálne a sú určené na tvorbu technických výkresov (modrotlač). Objekty sú kreslené presne pre zvolenú veľkosť alebo rozmer. Ak chcete nakresliť vodorovnú čiaru s dĺžkou 100 mm začínajúcu na (0,0), aktivujete nástroj čiara. Kliknete na obrazovku alebo zadáte súradnice (0,0) pre prvý bod, potom kliknete znovu alebo zadáte súradnice druhého bodu na (100,0). Alebo čiaru nakreslíte bez ohľadu na umiestnenie a presuniete ju neskôr. Po dokončení kreslenia geometrie jej priradíte rozmery.
Používanie väzieb náčrtu
"Náčrtník" sa od tohto postupu odlišuje. Objekty nemusia byť nakreslené úplne presne, pretože ich neskôr definujete priradenými väzbami. Môžete ich nakresliť voľne a pokiaľ sú bez väzieb, môžu byť upravované. V podstate "plávajú" na kresliacej ploche a môžete ich presúvať, naťahovať, otáčať, škálovať apod. To vám v procese návrhu poskytuje veľkú voľnosť.
Čo sú väzby?
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'.
Na čo Náčrtník slúžiť nemá
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.
Ak chcete vytvárať iba 2D pohľady pre tlač a nie 3D modely, skúste použiť radšej pracovný stôl Návrh. Na rozdiel od prvkov v Náčrtníku nepoužívajú objekty v Návrhu väzby; sú to jednoduché tvary definované v okamihu ich tvorby. Návrh aj Náčrtník je možné použiť na kreslenie 2D geometrie a vytváranie 3D telies, hoci zmysel ich použitia je iný; Náčrtník sa bežne používa spolu s pracovnými stolmi Diel a Tvorba dielu na vytváranie telies; Návrh sa bežne používa pre jednoduché rovinné výkresy s mriežkou, ako pri kreslení architektonického pôdorysu; v týchto situáciách sa Návrh väčšinou používa spolu s pracovným stolom Arch. Nástroj pracovného stola Návrh - Návrh do náčrtu prevedie objekt Návrhu na objekt Náčrtu a späť; mnoho nástrojov, ktoré ako vstup vyžadujú 2D tvar, dokážu pracovať s oboma typmi objektov, keďže sa pri tom vykoná automatická interná konverzia.
Pracovný postup pri náčrte
Náčrt je vždy dvojrozmerný (2D). Na vytvorenie telesa treba najprv vytvoriť 2D náčrt jednej uzavretej oblasti a ten potom vytiahnuť alebo obtočiť a tým pridať 3. rozmer, teda z 2D náčrtu vytvoriť 3D teleso.
Ak náčrt obsahuje segmenty, ktoré sa križujú, miesta, na ktorých sa bod nenachádza priamo na nejakom segmente, alebo miesta, na ktorých sú medzery medzi koncovými bodmi priľahlých segmentov, teleso sa vytiahnutím alebo obtočením nevytvorí. Niekedy bude s jednoduchými operáciami typu vytiahnutie fungovať aj náčrt, ktorý obsahuje križujúce sa čiary, ale neskoršie operácie, napr. lineárny vzor, zlyhajú. Preto odporúčame vyhnúť sa križovaniu čiar. Výnimkou z tohto pravidla je použitie konštrukčnej (modrej) geometrie.
Vo vnútri uzavretej oblasti sa môžu nachádzať aj menšie neprekrývajúce sa oblasti. Tieto sa pri tvorbe 3D telesa stanú prázdnym priestorom.
Akonáhle je náčrt plne zaväzbený, prvky náčrtu sa prefarbia na zeleno; konštrukčná geometria zostane modrá. V tomto okamihu je náčrt spravidla "dokončený" a pripravený na tvorbu 3D telesa. Po zavretí dialógového okna náčrtu ale môže byť užitočné prejsť na pracovný stôl Diel a spustiť príkaz Skontrolovať geometriu a odhaliť potenciálne prvky náčrtu, ktoré by mohli neskôr spôsobiť problémy.
Nástroje
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.
Všeobecné
- Nový náčrt: Vytvorí nový náčrt na vybranej ploche alebo rovine. Ak nie je pri spustení tohto nástroja vybraná žiadna plocha, užívateľ je vyzvaný zvoliť si z vyskakovacieho okna želanú rovinu.
- Upraviť náčrt: Úprava zvoleného náčrtu. Otvorí sa dialógové okno Náčrtníka.
- Opustiť náčrt: Ukončí režim úprav náčrtu.
- Zobraziť náčrt: Nastaví zobrazenie modelu kolmo na rovinu náčrtu.
- Zobraziť rez: Vytvorí reznú rovinu a dočasne skryje akýkoľvek materiál nachádzajúci sa pred reznou rovinou.
- Namapovať náčrt na plochu: Namapuje náčrt na predtým vybranú plochu alebo teleso.
- Preorientovať náčrt: Umožní vám naviazať náčrt na jednu z hlavných rovín.
- Skontrolovať náčrt: Skontroluje toleranciu jednotlivých bodov a upraví ich.
- Zlúčiť náčrty: Zlúči dva alebo viac náčrtov.
- Mirror sketch: Mirror a sketch along the x-axis, the y-axis or the origin.
- Stop operation: When in edit mode, stop the current operation, whether that is drawing, setting constraints, etc.
Sketcher geometries
These are tools for creating objects.
- Point: Draws a point.
- Line: Draws a line segment between 2 points. Lines are infinite regarding certain constraints.
- Create an arc: This is an icon menu in the Sketcher toolbar that holds the following commands:
- Arc: Draws an arc segment from center, radius, start angle and end angle.
- Arc by 3 points: Draws an arc segment from two endpoints and another point on the circumference.
- Create a circle: This is an icon menu in the Sketcher toolbar that holds the following commands:
- Circle: Draws a circle from center and radius.
- Circle by 3 points: Draws a circle from three points on the circumference.
- Create a conic: The sketcher provides the following conical sections. Unlike B-splines they can be used with all sorts of constraints such as Tangent, Point On Object, or Perpendicular.
- Ellipse by center: Draws an ellipse by center point, major radius point and minor radius point.
- Ellipse by 3 points: Draws an ellipse by major diameter (2 points) and minor radius point.
- Arc of ellipse: Draws an arc of ellipse by center point, major radius point, starting point and ending point.
- Arc of hyperbola: Draws an arc of hyperbola.
- Arc of parabola: Draws an arc of parabola.
- Create a B-spline: This is an icon menu in the Sketcher toolbar that holds the following commands:
- Create B-spline: Draws a B-spline curve by its control points.
- Create periodic B-spline: Draws a periodic (closed) B-spline curve by its control points.
- Polyline (multiple-point line): Draws a line made of multiple line segments. Pressing the M key while drawing a Polyline toggles between the different polyline modes.
- Create rectangles: This is an icon menu in the Sketcher toolbar that holds the following commands: introduced in version 0.20
- Rectangle: Draws a rectangle from 2 opposite points.
- Centered Rectangle: Draws a rectangle from a central point and an edge point. introduced in version 0.20
- Rounded Rectangle: Draws a rounded rectangle from 2 opposite points. introduced in version 0.20
- Create regular polygon: This is an icon menu in the Sketcher toolbar that holds the following commands:
- Triangle: Draws a regular triangle inscribed in a construction geometry circle.
- Square: Draws a regular square inscribed in a construction geometry circle.
- Pentagon: Draws a regular pentagon inscribed in a construction geometry circle.
- Hexagon: Draws a regular hexagon inscribed in a construction geometry circle.
- Heptagon: Draws a regular heptagon inscribed in a construction geometry circle.
- Octagon: Draws a regular octagon inscribed in a construction geometry circle.
- Create Regular Polygon : Draws a regular polygon by selecting the number of sides and picking two points: the center and one corner.
- Slot: Draws an oval by selecting the center of one semicircle and an endpoint of the other semicircle.
- Fillet: Makes a fillet between two lines joined at one point. Select both lines or click on the corner point, then activate the tool.
- Trimming: Trims a line, circle or arc with respect to the clicked point.
- Extend: Extends a line or an arc to a boundary line, arc, ellipse, arc of ellipse or a point in space.
- Split: Splits a line or an arc into two, converts a circle into an arc while keeping most of the constraints. introduced in version 0.20
- External Geometry: Creates an edge linked to external geometry.
- CarbonCopy: Copies the geometry of another sketch.
- Construction Mode: Toggles sketch geometry from/to construction mode. Construction geometry is shown in blue and is discarded outside of Sketch editing mode.
Sketcher constraints
Constraints are used to define lengths, set rules between sketch elements, and to lock the sketch along the vertical and horizontal axes. Some constraints require use of Helper constraints.
Geometric constraints
These constraints are not associated with numeric data.
- Coincident: Affixes a point onto (coincident with) one or more other points.
- Point On Object: Affixes a point onto another object such as a line, arc, or axis.
- Vertical: Constrains the selected lines or polyline elements to a true vertical orientation. More than one object can be selected before applying this constraint.
- Horizontal: Constrains the selected lines or polyline elements to a true horizontal orientation. More than one object can be selected before applying this constraint.
- Parallel: Constrains two or more lines parallel to one another.
- Perpendicular: Constrains two lines perpendicular to one another, or constrains a line perpendicular to an arc endpoint.
- Tangent: Creates a tangent constraint between two selected entities, or a co-linear constraint between two line segments. A line segment does not have to lie directly on an arc or circle to be constrained tangent to that arc or circle.
- Equal: Constrains two selected entities equal to one another. If used on circles or arcs their radii will be set equal.
- Symmetric: Constrains two points symmetrically about a line, or constrains the first two selected points symmetrically about a third selected point.
- Block: it blocks an edge from moving, that is, it prevents its vertices from changing their current positions. It should be particularly useful to fix the position of B-Splines. See the Block Constraint forum topic.
Dimensional constraints
These are constraints associated with numeric data, for which you can use the expressions. The data may be taken from a spreadsheet.
- Lock: Constrains the selected item by setting vertical and horizontal distances relative to the origin, thereby locking the location of that item. These constraint distances can be edited later.
- Horizontal distance: Fixes the horizontal distance between two points or line endpoints. If only one item is selected, the distance is set to the origin.
- Vertical distance: Fixes the vertical distance between 2 points or line endpoints. If only one item is selected, the distance is set to the origin.
- Distance: Defines the distance of a selected line by constraining its length, or defines the distance between two points by constraining the distance between them.
- Radius: Defines the radius of a selected arc or circle by constraining the radius.
- Diameter: Defines the diameter of a selected arc or circle by constraining the diameter.
- Radiam: Automatically defines radius/diameter of a selected arc or circle (weight for a B-spline pole, diameter for a complete circle, radius for an arc) introduced in version 0.20
- Angle: Defines the internal angle between two selected lines.
Special constraints
- Snell's Law: Constrains two lines to obey a refraction law to simulate the light going through an interface.
- Internal alignment: Aligns selected elements to selected shape (e.g. a line to become major axis of an ellipse).
Constraint tools
The following tools can be used the change the effect of constraints:
- Toggle driving/reference constraint: Toggles the toolbar or the selected constraints to/from reference mode.
- Activate/Deactivate constraint: Enable or disable an already placed constraint. introduced in version 0.19
Sketcher tools
- Select solver DOFs: Highlights in green the geometry with degrees of freedom (DOFs), i.e. not fully constrained.
- Close Shape: Creates a closed shape by applying coincident constraints to endpoints.
- Connect Edges: Connect sketcher elements by applying coincident constraints to endpoints.
- Select Constraints: Selects the constraints of a sketcher element.
- Select Elements Associated with constraints: Select sketcher elements associated with constraints.
- Select Redundant Constraints: Selects redundant constraints of a sketch.
- Select Conflicting Constraints: Selects conflicting constraints of a sketch.
- Show/Hide internal geometry: Recreates missing/deletes unneeded internal geometry of a selected ellipse, arc of ellipse/hyperbola/parabola or B-spline.
- Select Origin: Selects the origin of a sketch.
- Select Vertical Axis: Selects the vertical axis of a sketch.
- Select Horizontal Axis: Selects the horizontal axis of a sketch.
- Symmetry: Copies a sketcher element symmetrical to a chosen line.
- Clone: Clones a sketcher element.
- Copy: Copies a sketcher element.
- Move: Moves the selected geometry taking as reference the last selected point.
- Rectangular Array: Creates an array of selected sketcher elements.
- Remove Axes Alignment: Remove axes alignment while trying to preserve the constraint relationship of the selection. introduced in version 0.20
- Delete All Geometry: Deletes all geometry from the sketch.
- Delete All Constraints: Deletes all constraints from the sketch.
Sketcher B-spline tools
Sketcher virtual space
- Switch Virtual Space: Allows you to hide all constraints of a sketch and make them visible again.
Preferences
- Preferences: Preferences for the Sketcher workbench.
Best Practices
Every CAD user develops his own way of working over time, but there are some useful general principles to follow.
- A series of simple sketches is easier to manage than a single complex one. For example, a first sketch can be created for the base 3D feature (either a pad or a revolve), while a second one can contain holes or cutouts (pockets). Some details can be left out, to be realized later on as 3D features. You can choose to avoid fillets in your sketch if there are too many, and add them as a 3D feature.
- Always create a closed profile, or your sketch won't produce a solid, but rather a set of open faces. If you don't want some of the objects to be included in the solid creation, turn them to construction elements with the Construction Mode tool.
- Use the auto constraints feature to limit the number of constraints you'll have to add manually.
- As a general rule, apply geometric constraints first, then dimensional constraints, and lock your sketch last. But remember: rules are made to be broken. If you're having trouble manipulating your sketch, it may be useful to constrain a few objects first before completing your profile.
- If possible, center your sketch to the origin (0,0) with the lock constraint. If your sketch is not symmetric, locate one of its points to the origin, or choose nice round numbers for the lock distances. In v0.12, external constraints (constraining the sketch to existing 3D geometry like edges or to other sketches) are not implemented. This means that to locate following sketches geometry to your first sketch, you'll need to set distances relative to your first sketch manually. A lock constraint of (25,75) from the origin is more easily remembered than (23.47,73.02).
- If you have the possibility to choose between the Length constraint and the Horizontal or Vertical Distance constraints, prefer the latter. Horizontal and Vertical Distance constraints are computationally cheaper.
- In general, the best constraints to use are: Horizontal and Vertical Constraints; Horizontal and Vertical Length Constraints; Point-to-Point Tangency. If possible, limit the use of these: the general Length Constraint; Edge-to-Edge Tangency; Fix Point Onto a Line Constraint; Symmetry Constraint.
- If in doubt about the validity of a sketch once it is complete (features turn green), close the Sketcher dialog, switch to the Part Workbench and run Check geometry.
Tutorials
- Sketcher tutorial by chrisb. This is a 70-page long PDF document that serves as a detailed manual for the sketcher. It explains the basics of Sketcher usage, and goes into a lot of detail about the creation of geometrical shapes, and each of the constraints.
- Basic Sketcher Tutorial for beginners
- Sketcher Micro Tutorial - Constraint Practices
- Sketcher requirement for a sketch Minimum requirement for a sketch and Complete determination of a sketch
Scripting
The Sketcher scripting page contains examples on how to create constraints from Python scripts.
- General: Create sketch, Edit sketch, Attach sketch, Reorient sketch, Validate sketch, Merge sketches, Mirror sketch, Leave sketch, View sketch, View section, Toggle grid, Toggle snap, Configure rendering order, Stop operation
- Sketcher geometries: Point, Polyline, Line, Arc, Arc by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, Circle, Circle by 3 points, Ellipse, Ellipse by 3 points, Rectangle, Centered rectangle, Rounded rectangle, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Regular polygon, Slot, Arc slot, B-spline by control points, Periodic B-spline by control points, B-spline by knots, Periodic B-spline by knots, Toggle construction geometry
- Sketcher constraints:
- Dimensional constraints: Dimension, Horizontal distance, Vertical distance, Distance, Auto radius/diameter, Radius, Diameter, Angle, Lock
- Geometric constraints: Coincident (unified), Coincident, Point on object, Horizontal/vertical, Horizontal, Vertical, Parallel, Perpendicular, Tangent or collinear, Equal, Symmetric, Block
- Other constraints: Refraction (Snell's law)
- Constraint tools: Toggle driving/reference constraint, Activate/deactivate constraint
- Sketcher tools: Fillet, Chamfer, Trim, Split, Extend, External geometry, Carbon copy, Select origin, Select horizontal axis, Select vertical axis, Array transform, Polar transform, Scale transform, Offset geometry, Symmetry, Remove axes alignment, Delete all geometry, Delete all constraints
- Sketcher B-spline tools: Convert geometry to B-spline, Increase B-spline degree, Decrease B-spline degree, Increase knot multiplicity, Decrease knot multiplicity, Insert knot, Join curves
- Sketcher visual: Select unconstrained DoF, Select associated constraints, Select associated geometry, Select redundant constraints, Select conflicting constraints, Show/hide circular helper for arcs, Show/hide B-spline degree, Show/hide B-spline control polygon, Show/hide B-spline curvature comb, Show/hide B-spline knot multiplicity, Show/hide B-spline control point weight, Show/hide internal geometry, Switch virtual space
- Additional: Sketcher Dialog, Preferences, Sketcher scripting
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub