Wall Placement should be necessarily relative to walltrace placement?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Wall Placement should be necessarily relative to walltrace placement?

Post by carlopav »

I'm still experimenting with wall placement and draft modifiers.
I think i'm on the right way for what is concerning the diplacement of children when wall placement changes.
Now, trying to tackle also the movement of the Base, i'm to a new stop:
- if placement propagation is controlled by wall object, this will not happen if the wall placement doesn't change: so if we move the base but not the wall, the wall will not "understand" that it's been moved. And consequently children won't be moved neither.

so come the questions:
- how moving the base is handled in the code? I couldn't find at a first glance.
- why wall Placement is relative to its Base Placement? I found this a bit unconvenient: i can't imagine a concrete usecase where i want all the walls related to a base object change position when the base changes position. I understand that they can react to a shape change, but position?
Wouldn't be easier if both keep their absolute coordinates?

thanx to anyone who can enlight me :)
goodnight!
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by Roy_043 »

carlopav wrote: Sun Dec 01, 2019 10:55 pm why wall Placement is relative to its Base Placement?
I wonder if that is in fact the case. If I create a sketch first, move it away from the origin and then create a wall, the placement of the wall is 0,0,0. This suggests that the default placement of the wall is not derived from that of its base.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by carlopav »

Exactly: 0,0,0 from the placement of the sketch
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by Roy_043 »

No, you have misunderstood. The initial placement of the wall is ALWAYS 0,0,0. The placement of the sketch is not taken into account.
Attachments
WallPlacementTest.FCStd
(22.37 KiB) Downloaded 38 times
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by paullee »

carlopav wrote: Sun Dec 01, 2019 10:55 pm - why wall Placement is relative to its Base Placement? I found this a bit unconvenient: i can't imagine a concrete usecase where i want all the walls related to a base object change position when the base changes position. I understand that they can react to a shape change, but position?
Wouldn't be easier if both keep their absolute coordinates?
Not sure I understand you.

Are you thinking the Wall object be better not moved when the Base object move ? This is one of the behaviour I would like Arch Object have - trying to implement that if there is a gap.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by carlopav »

Roy_043 wrote: Tue Dec 03, 2019 1:55 pm No, you have misunderstood. The initial placement of the wall is ALWAYS 0,0,0. The placement of the sketch is not taken into account.
Sorry, i probably didnt explain it right at the beginning.
example:
Sketch.Placement = Placement [Pos=(443.848,293.797,0), Yaw-Pitch-Roll=(0,0,0)]
Wall.Placement = Placement [Pos=(0,0,0), Yaw-Pitch-Roll=(0,0,0)]
But wall is coincident with the sketch.
So, if the wall has 0,0,0 placement, this means it's 0,0,0 relative to the sketch position... not that the wall is placed on the origin... is it? starting to have doubts too...
paullee wrote: Tue Dec 03, 2019 2:04 pm Are you thinking the Wall object be better not moved when the Base object move ? This is one of the behaviour I would like Arch Object have - trying to implement that if there is a gap.
Basically YES. we can achieve this using App::Link, or making Wall placement indipendent from Wall.Base placement... at least I guess... so it just take the shape and not the placement from the Base.
So to have them coincident we should have
Sketch.Placement = Placement [Pos=(443.848,293.797,0), Yaw-Pitch-Roll=(0,0,0)]
Wall.Placement = Placement [Pos=(443.848,293.797,0), Yaw-Pitch-Roll=(0,0,0)]
follow my experiments on BIM modelling for architecture design
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by paullee »

carlopav wrote: Tue Dec 03, 2019 2:32 pm
Basically YES. we can achieve this using App::Link, or making Wall placement indipendent from Wall.Base placement... at least I guess... so it just take the shape and not the placement from the Base.
So to have them coincident we should have
Sketch.Placement = Placement [Pos=(443.848,293.797,0), Yaw-Pitch-Roll=(0,0,0)]
Wall.Placement = Placement [Pos=(443.848,293.797,0), Yaw-Pitch-Roll=(0,0,0)]
It can be done altering ArchWall / ArchComponent alone, I haven't confirmed in details exactly the part of code required. Not everyone may like this behaviour though as I have been testing bit of the result.

One not apparent difference that may confuse people is between Sketch and Draft Wire.

The starting point of Draft Wire is kind of 'origin' - draft a random DWire, it is not at (0,0,0); change the placement to (0,0,0), find the starting point fall at (0,0,0)

Create Sketch, and draw random edges, and exit. The Sketch is at (0,0,0), but none of the wire vertexes is at (0,0,0)

I kind of reading the Sketch 'origin' as 'Insertion Point' - AutoCad's concept so no problem with it. The above difference may still be confusing?
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by carlopav »

paullee wrote: Tue Dec 03, 2019 5:30 pm The starting point of Draft Wire is kind of 'origin' - draft a random DWire, it is not at (0,0,0); change the placement to (0,0,0), find the starting point fall at (0,0,0)
Not always, if you edit the DWire with DraftEdit, you can move the first point, and it will not be any more coincident with the Placement (0,0,0).This can obviously be changed.
Anyway I find interesting that you pointed out that placement is not to be misundestood as block origin.

Anyway 2, my goal is to make walls work as i expect when using draft modifiers and when changing their placement. And of course this should work with every kind of wall (no base, walltrace, archsketch, wire, every other object), (and propagate changes to children).
And since placement propagation seems to works smoothly in my branch, i was thinking how to correctly move the base. But if I have to move the wall (because it's a wall.placement change that have to be detected to be propagated to children) i can't also move the base, because this will produce a loop and move again the wall and the children.
So, with this in mind, I thought that would be better if moving the base do not directly move the wall, so moving the base to keep it in place with the wall will become exactly simple as moving a wall child. Perhaps link could be involved...
follow my experiments on BIM modelling for architecture design
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by paullee »

carlopav wrote: Tue Dec 03, 2019 9:36 pm
Not always, if you edit the DWire with DraftEdit, you can move the first point, and it will not be any more coincident with the Placement (0,0,0).This can obviously be changed.
Thanks pointing this out
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: Wall Placement should be necessarily relative to walltrace placement?

Post by Roy_043 »

carlopav wrote: Tue Dec 03, 2019 2:32 pm So, if the wall has 0,0,0 placement, this means it's 0,0,0 relative to the sketch position
Aha, thanks for explaining. I understand now.
Post Reply