Reference(Datum) Line through sketch circle center?
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Reference(Datum) Line through sketch circle center?
Is there a way to make the center of a circle/arc visible so one can create a datum line through it?
I need a way to position two bodies at that point (e.g. for shaft alignment).
I can get at it from within a sketch in the second body, by creating a shape binder to the sketch in the first body which has the matching hole, and then creating an external link in the sketch in the second body to the circle in the shape binder, which makes the center show up. But I need the center of the hole in the first body for setting the placement property on the second body.
I need a way to position two bodies at that point (e.g. for shaft alignment).
I can get at it from within a sketch in the second body, by creating a shape binder to the sketch in the first body which has the matching hole, and then creating an external link in the sketch in the second body to the circle in the shape binder, which makes the center show up. But I need the center of the hole in the first body for setting the placement property on the second body.
Re: Reference(Datum) Line through sketch circle center?
Click with your mouse on the edge of the circle/cylinder and the Datumline automatically takes the center
Re: Reference(Datum) Line through sketch circle center?
Use AttachmentMode "Concentric". If it should go through the circle itself, turn it by 90°.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Reference(Datum) Line through sketch circle center?
Thanks, both of you.
If I select the datum line, I can see its z offset. If I give it a label, I see that also.
However, when I attempt to set the Placement z offset for another body, I can't figure out how to access the datum line.
The expression parser for the value in the property editor likes "Axis1_Mount" (the label for the body containing the new datum line), but doesn't show anything I think I should see when I type "Axis1_Mount.Ref_Ax1_HoleAxis" or "Axis1_Mount.Datum". I tried using the Python console to see how to access the parts of the body, but I couldn't figure that out, and I don't see a "list" type prodedure. The scripting tutorial didn't cover this.
Hints/pointers?
If I select the datum line, I can see its z offset. If I give it a label, I see that also.
However, when I attempt to set the Placement z offset for another body, I can't figure out how to access the datum line.
The expression parser for the value in the property editor likes "Axis1_Mount" (the label for the body containing the new datum line), but doesn't show anything I think I should see when I type "Axis1_Mount.Ref_Ax1_HoleAxis" or "Axis1_Mount.Datum". I tried using the Python console to see how to access the parts of the body, but I couldn't figure that out, and I don't see a "list" type prodedure. The scripting tutorial didn't cover this.
Hints/pointers?
Re: Reference(Datum) Line through sketch circle center?
In an expression you can use the name of the datum line directly without the "path" prefixed by the body name.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Reference(Datum) Line through sketch circle center?
Messing with the console, I'm pretty confused.
If I click on a subobject of a body in a part, I see:
>>> Gui.Selection.addSelection('Assembly_1','Part','Body.')
selects "Assembly_1#Part.Body. (Axis1_Mount)"
If I enter in the python console:
>>> Gui.Selection.addSelection('Assembly_1','Part','Body.')
I see the same thing. ok so far.
If I enter:
>>> Gui.Selection.addSelection('Assembly_1','Part','Axis1_Mount')
I get "Assembly_1#Part.Axis1_Mount not found"
If I enter:
>>> Gui.Selection.addSelection('Assembly_1','Part','Axis1_Mount.')
I get "Assembly_1#Part.Axis1_Mount. not found"
are labels not allowed in the console for object selection?
They seem to be allowed in the Data display for setting properties like placement position and sketch constraints.
Re: Reference(Datum) Line through sketch circle center?
In my sketch, clicking on the DatumLine, I see the property:
Attachment:Attachment/Position/z is 0.0
but
Base: Placement/Position/z is 251.58
I want access to the Base: number.
If I type:
doc.DatumLine.Placement
into the console, I see:
Placement [Pos=(61,0,251.577), Yaw-Pitch-Roll=(90,0,90)]
ok.
If I type:
doc.DatumLine.Placement.Base.z
I get the number I'm looking for.
Why is it Placement.Base.z, given the hierarchy in the Data display is Base/Placement.Position.z?
How is one supposed to discover the path to a value? Finding the axis values is equally obtuse.
Attachment:Attachment/Position/z is 0.0
but
Base: Placement/Position/z is 251.58
I want access to the Base: number.
If I type:
doc.DatumLine.Placement
into the console, I see:
Placement [Pos=(61,0,251.577), Yaw-Pitch-Roll=(90,0,90)]
ok.
If I type:
doc.DatumLine.Placement.Base.z
I get the number I'm looking for.
Why is it Placement.Base.z, given the hierarchy in the Data display is Base/Placement.Position.z?
How is one supposed to discover the path to a value? Finding the axis values is equally obtuse.
Re: Reference(Datum) Line through sketch circle center?
It is documented in Placement.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Reference(Datum) Line through sketch circle center?
Thanks, that helped.
One question not answered -- is one not allowed to use the renamed object (Label) for references? One can do this with constraints, but it doesn't seem to work for objects. It's rather awkward to have to use the generally meaningless freecad generated names.
One question not answered -- is one not allowed to use the renamed object (Label) for references? One can do this with constraints, but it doesn't seem to work for objects. It's rather awkward to have to use the generally meaningless freecad generated names.