It is more a lesson than a mere answer.
I will incorporate it in my notes about coordinates. Thank you for your time drmacro.
Root point is the intersection of X and Y axis of the sketch?drmacro wrote: ↑Sat Jul 02, 2022 12:51 pm
A sketch in a Body always references the Origin object of the Body. The LCS of the sketch is confusing to many. When a sketch is created the origin of the sketch is somewhere in the Body LCS (the Body LCS, is represented by the Origin object). When you open the sketch it has, let's call it a temporary LCS, where +Z is from the Root point out of the screen, +X is from the Root point to the right, and +Y is from the Root point up.
Yesmanos wrote: ↑Sat Jul 02, 2022 5:46 pmRoot point is the intersection of X and Y axis of the sketch?drmacro wrote: ↑Sat Jul 02, 2022 12:51 pm
A sketch in a Body always references the Origin object of the Body. The LCS of the sketch is confusing to many. When a sketch is created the origin of the sketch is somewhere in the Body LCS (the Body LCS, is represented by the Origin object). When you open the sketch it has, let's call it a temporary LCS, where +Z is from the Root point out of the screen, +X is from the Root point to the right, and +Y is from the Root point up.
Those axis (plus the vertical Z) are always the axis of the sketch ? Even after any attachment or Placement ?
Please answer yes.
True, I guess. The Attachment offset shown in properties represents the some of the Properties of the Attachment (OOP) object.
Cool . Is that stands also when we create the sketch in PartDesign WB ?drmacro wrote: ↑Sat Jul 02, 2022 6:19 pmYesmanos wrote: ↑Sat Jul 02, 2022 5:46 pmRoot point is the intersection of X and Y axis of the sketch?drmacro wrote: ↑Sat Jul 02, 2022 12:51 pm
A sketch in a Body always references the Origin object of the Body. The LCS of the sketch is confusing to many. When a sketch is created the origin of the sketch is somewhere in the Body LCS (the Body LCS, is represented by the Origin object). When you open the sketch it has, let's call it a temporary LCS, where +Z is from the Root point out of the screen, +X is from the Root point to the right, and +Y is from the Root point up.
Those axis (plus the vertical Z) are always the axis of the sketch ? Even after any attachment or Placement ?
Please answer yes.
You mean:The Attachment offset shown in properties represents the sum of the Properties of the Attachment (OOP) object. ?
Frankly it is not long at all
In fact I have studied physics....(if you ever studied physics
The two magenta phrases seems to me contradictory. Any help ?
Every object that has a shape has a placement property (including Part and Body containers) that defines it's position in the coordinate system were this object is located, so the placement of objects in the root level of the tree is relative to the GCS, the placement of object inside a Part container is relative to Part's OWN CS (and these can be nested, you can have an object inside a part inside a part, the placement of each will be RELATIVE to it's parent)..
Please accept questions about this paragraph at the next days .Now attachments and attachment offset. This can easily confuse you as in some case you may see that the attachment offset and the placement are the same, this happens when an object is attached to something with placed at the origin and with no rotation.
In general you can attach an object to another and this binds the object's placement to whatever it is attached to, for example you can attach a sketch to the top face of a cube, then you can see that it's placement z value is the same as the cube height (for example 10mm), your attachment offset is still 0.
The attachment offset let's you move the object relative to the attachment point, try editing the attachment offset of that sketch to z=10mm you will then see that the placement of the sketch now has z=20mm. So attaching the sketch to the face move it 10mm up, then with the offset you moved it 10mm more.
Code: Select all
doc + App.ActiveDocument
obj = doc.getObject("Part")
obj.Placement # Placement [Pos=(0,0,0), Yaw-Pitch-Roll=(0,0,0)]
Code: Select all
obj = doc.getObject("Box")
obj.AttachmentOffset #Placement [Pos=(0,0,20), Yaw-Pitch-Roll=(0,0,0)]
obj.Placement #Placement [Pos=(20,-4.44089e-15,4.44089e-15), Yaw-Pitch-Roll=(90,1.27222e-14,90)]
Code: Select all
obj = doc.getObject("Sketch")
obj.getParentGeoFeatureGroup().Name # 'Body'