With an object formed with a sketches and extrudes and a boolean in Part WB.
I then change the placement of resultant object.
I then create a Body in Part Design WB and drag the previous object into the Body.
The BaseFeature moves to the origin.
Is this desired behavior?
OS: Ubuntu 19.10 (XFCE/ubuntustudio)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Ticket #4300 - Part object moves to 0,0 when dragged into Part Design Body
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!
Ticket #4300 - Part object moves to 0,0 when dragged into Part Design Body
- Attachments
-
- ParttoPartDesign.FCStd
- (21.84 KiB) Downloaded 28 times
Last edited by Kunda1 on Sat Apr 04, 2020 11:26 am, edited 1 time in total.
Reason: Added ticket number to thread title
Reason: Added ticket number to thread title
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Part object moves to 0,0 when dragged into Part Design Body
Yes. It may be worth a feature request though to
- add AttachmentOffset to BaseFeatures
- add TraceSupport as it is used for ShapeBinders.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Part object moves to 0,0 when dragged into Part Design Body
Just compound the (lone) Cut (in your example) and use the newly created Compound as BaseFeature.
Re: Part object moves to 0,0 when dragged into Part Design Body
Intuitively obvious...
NOT
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Part object moves to 0,0 when dragged into Part Design Body
Actually this is (maybe not obvious), but normal when you know a bit the why.
What happens :
When you compound the cut, FC recomputes a new shape which actually is the shifted shape of the cut. This means that the cut placement shift has been 'integrated' into the compound internal shape. Hence it is included when using the compound as BaseFeature.
Notice that if you further move the compound with its placement, this won't be included in the BaseFeature (same case as with the cut).
This is a tip I often use to center ShapeStrings, then eventually further move them based on the centered shape.
What happens :
- FC computes the shape of the cut
- Then it applies the move shift corresponding to the placement
When you compound the cut, FC recomputes a new shape which actually is the shifted shape of the cut. This means that the cut placement shift has been 'integrated' into the compound internal shape. Hence it is included when using the compound as BaseFeature.
Notice that if you further move the compound with its placement, this won't be included in the BaseFeature (same case as with the cut).
This is a tip I often use to center ShapeStrings, then eventually further move them based on the centered shape.
Re: Part object moves to 0,0 when dragged into Part Design Body
After explanation, the behavior makes sense. But to the end user, who sees on the screen an object that is not at the origin, there's no good reason to expect including in another wrapper (the Body) would move it to origin. Unless, said user is aware that that is the defined behavior. (it may be defined in user docs somewhere, I'm just saying I haven't noted it. and, it may well be defined as SOP in the programming docs. )openBrain wrote: ↑Tue Mar 31, 2020 5:29 pm Actually this is (maybe not obvious), but normal when you know a bit the why.
What happens :But actually, the internal shape object is still 'referenced' to the computation origin. Thus when you use it as BaseFeature, FC copies the shape only (without placement attributes of the cut) hence it's back to origin.
- FC computes the shape of the cut
- Then it applies the move shift corresponding to the placement
When you compound the cut, FC recomputes a new shape which actually is the shifted shape of the cut. This means that the cut placement shift has been 'integrated' into the compound internal shape. Hence it is included when using the compound as BaseFeature.
Notice that if you further move the compound with its placement, this won't be included in the BaseFeature (same case as with the cut).
In any case, as chrisb suggested, I put in a feature request. If that were to be implemented, then there would be a distinct need to document the outward behavior (what the user sees) and what effect the new feature provides.
And, that indeed is a good tip.This is a tip I often use to center ShapeStrings, then eventually further move them based on the centered shape.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Part object moves to 0,0 when dragged into Part Design Body
Playing around with this.
- I created a ShapeString at an arbitrary location
- Extruded in Part WB (The extrude remains at the arbitrary location, but Placement value is 0,0,0)
- create body, drag Extrude to body
BaseFeature is at the arbitrary location. I expected, per this discussion, it'd move to global origin. Obviously I missed the point...
I thought maybe:
- create Shapestring at global origin
- extrude
- move placement
- drag to body
No error in report view, but it does not create a BaseFeature.
I tried other combinations. Geometry created in a sketch and moved, goes to global origin when dragged into a body.
But, geometry created with a shapestring does not move to origin.
What don't I know or understand?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Part object moves to 0,0 when dragged into Part Design Body
Found this old topic when looking for the tracker issue concerning Placement of BaseFeatures. I found another way of changing the BaseFeatures position:
Use "ShowAll" in the attributes and then change the Placement. By setting it in an expression to the placement of its source it always follows as if it had a TraceSupport=true property.
Now for this special question:
Use "ShowAll" in the attributes and then change the Placement. By setting it in an expression to the placement of its source it always follows as if it had a TraceSupport=true property.
Now for this special question:
If you have more than one letter, the BaseFeature would create a multiple solid body. With a single letter I had no problems using an extruded ShapeString as a BaseFeature.drmacro wrote: ↑Fri Apr 03, 2020 2:51 pm - create Shapestring at global origin
- extrude
- move placement
- drag to body
No error in report view, but it does not create a BaseFeature.
I tried other combinations. Geometry created in a sketch and moved, goes to global origin when dragged into a body.
But, geometry created with a shapestring does not move to origin.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.