Sketcher ConstrainPointOnObject/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "Vazba Bod na objekt")
 
(Updating to match new version of source page)
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Constraint PointOnObject|Workbenches=[[Sketcher Workbench|Sketcher]], [[PartDesign Workbench|PartDesign]]|MenuLocation=Sketch → Sketcher constraints → Constrain point onto object|SeeAlso=[[Constraint PointOnPoint|Constraint Coincident]]}}


{{Docnav
====Description====
|[[Sketcher_ConstrainCoincident|Coincident]]
|[[Sketcher_ConstrainHorVer|Horizontal/Vertical]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainCoincident.svg
|IconR=Sketcher_ConstrainHorVer.svg
|IconC=Workbench_Sketcher.svg
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/cs
|Name=Constraint PointOnObject
|Name/cs=Constraint PointOnObject
|Workbenches=[[Sketcher Workbench/cs|Náčrt]], [[PartDesign Workbench/cs|Návrh dílu]]
|MenuLocation=Sketch → Sketcher constraints → Constrain point onto object
|SeeAlso=[[Sketcher_ConstrainCoincident/cs|Vazba totožnosti]]
}}
</div>


====Usage====
==Description==


<div class="mw-translate-fuzzy">
{{clear}}
====Popis====
<languages/>
</div>

{{Version|0.22}}: This command is replaced by the [[Sketcher_ConstrainCoincidentUnified|Sketcher ConstrainCoincidentUnified]] command if the {{MenuCommand|Unify Coincident and PointOnObject}} option is selected in the [[Sketcher_Preferences#General|Sketcher Preferences]].

<span id="Usage"></span>
<div class="mw-translate-fuzzy">
====Použití====
</div>

# Optionally do one of the following:
#* Select a single point and a single edge (in any order).
#* Select several points and a single edge (idem).
#* Select a single point and several edges (idem).
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Sketcher_ConstrainPointOnObject.svg|16px]] [[Sketcher_ConstrainPointOnObject|Constrain point onto object]]}} button.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainPointOnObject.svg|16px]] Constrain point onto object}} option from the menu.
#* Use the keyboard shortcut: {{KEY|O}}.
# To indicate that the command has been activated the cursor changes to a white cross with the command icon.
# Optionally keep selecting elements. You can only select two elements at a time now.
# To finish the command press {{KEY|Esc}} or the right mouse button, or start a another constraints or geometries command.

==Scripting==

The constraint can be created from [[Macros|macros]] and from the [[Python|Python]] console by using the following command:

{{incode|Sketch.addConstraint(Sketcher.Constraint('PointOnObject',LineMoving,PointOfLineMoving,LineFixed))}}

* {{incode|Sketch}} is a sketch object.
* {{incode|LineMoving}} is the number that designates the line, which contains the point that has to be moved onto the {{incode|LineFixed}} (the line which is fixed).
* {{incode|PointOfLineMoving}} is the number of the vertex of line {{incode|LineMoving}}, that has to be moved onto the {{incode|LineFixed}}.
* {{incode|LinedFixed}} is the number of the line to be affixed onto the point {{incode|PointOfLineMoving}}.

The [[Sketcher_scripting|Sketcher scripting]] page explains how to identify the numbers that designate lines and points.


{{Docnav
|[[Sketcher_ConstrainCoincident|Coincident]]
|[[Sketcher_ConstrainHorVer|Horizontal/Vertical]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainCoincident.svg
|IconR=Sketcher_ConstrainHorVer.svg
|IconC=Workbench_Sketcher.svg
}}

{{Sketcher_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 13:59, 17 January 2024

Constraint PointOnObject

Umístění Menu
Sketch → Sketcher constraints → Constrain point onto object
Pracovní stoly
Náčrt, Návrh dílu
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
Vazba totožnosti

Description

Popis

introduced in version 0.22: This command is replaced by the Sketcher ConstrainCoincidentUnified command if the Unify Coincident and PointOnObject option is selected in the Sketcher Preferences.

Použití

  1. Optionally do one of the following:
    • Select a single point and a single edge (in any order).
    • Select several points and a single edge (idem).
    • Select a single point and several edges (idem).
  2. There are several ways to invoke the command:
    • Press the Constrain point onto object button.
    • Select the Sketch → Sketcher constraints → Constrain point onto object option from the menu.
    • Use the keyboard shortcut: O.
  3. To indicate that the command has been activated the cursor changes to a white cross with the command icon.
  4. Optionally keep selecting elements. You can only select two elements at a time now.
  5. To finish the command press Esc or the right mouse button, or start a another constraints or geometries command.

Scripting

The constraint can be created from macros and from the Python console by using the following command:

Sketch.addConstraint(Sketcher.Constraint('PointOnObject',LineMoving,PointOfLineMoving,LineFixed))

  • Sketch is a sketch object.
  • LineMoving is the number that designates the line, which contains the point that has to be moved onto the LineFixed (the line which is fixed).
  • PointOfLineMoving is the number of the vertex of line LineMoving, that has to be moved onto the LineFixed.
  • LinedFixed is the number of the line to be affixed onto the point PointOfLineMoving.

The Sketcher scripting page explains how to identify the numbers that designate lines and points.