Asm4: Designing two parts to interface..

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
tom_hampton
Posts: 12
Joined: Thu Jan 21, 2021 10:27 pm

Asm4: Designing two parts to interface..

Post by tom_hampton »

Hi-

Note: Help|About info is listed below.

This is my first post....so, please be gentle. FWIW, I'm an electrical and software engineer by trade (so... not worth much).

I'm getting more comfortable working in Asm4: using variables to define master sketches, using sketches to constrain assembly LCS's, and attaching parts to those LCS (part_LCS to Asm_LCS). I'm liking the O- attachment modes, as they work mostly intuitively for putting the LCS where I want it to be on a vertex in the Master Sketch, including rotations and offsets.

So far, I've been able to do all that where the parts are independently defined and I'm just sticking them together. So to speak. Some are parts I've created, some are step files from grabcad. I even had some good learning experience in the step files having strange origins, and how to take that step and turn it into a part with the LCS oriented how I want it to be for ease of placement.

So far so good.

What I'm struggling to understand is how to define the interface relationship between two parts that are attached via their LCS where the size and shape of the interface between the two parts "surrounds" the LCS origins in both coordinate systems. My example is below:
simrig.PNG
simrig.PNG (220.8 KiB) Viewed 527 times
Its probably obvious what this is---a sim-racing rig. The interface I'm referring to is for the pedal assembly. I have a rough sketch of just the brake pedal circled in blue above. The pedal assembly will be an inverted-L box that the pedals are attached to. The L will attach to the outside of the main rig along the top, with the pedals hanging from the L. The sides of the pedal frame will fit inside the main-rig box edges.

So, my question...if I change the pedal height (location of the LCS_brakepedal) in the model then the Vertex of the inverted L would need to resize. Likewise if I change the width of the main-rig, then the pedal-box needs to change size. I suppose I can do enough arithmetic using variables:

pedal_frame_mount_height = (box_height- pedal_height),
pedal_frame_mount_depth = (main_rig_length - pedal_distance),
pedal_frame_width = (box_width - 2*wall_thickness),
etc.

But, it starts to feel like writing software using global variables everywhere. It seems like a lot of "work" to create two parametrically mated parts.

What I think I'd like to do is be able to create a master_sketch in the assembly, constrained by the relevant geometry. Which I could then reference in the Pedal_Assembly parts. But, I don't "think" that's possible. What am I missing?

Thanks.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23463 (Git)
Build type: Release
Branch: master
Hash: adc6db8f32c17e9f67cb82aa7962d1e42ce061c6
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Asm4: Designing two parts to interface..

Post by Zolko »

tom_hampton wrote: Thu Jan 21, 2021 11:52 pm What I think I'd like to do is be able to create a master_sketch in the assembly, constrained by the relevant geometry. Which I could then reference in the Pedal_Assembly parts. But, I don't "think" that's possible. What am I missing?
If the Pedal_Assembly is in the same document, it should be possible. If you want the Pedal_Assembly to be in an external document, it's more tricky, and may-be impossible.

This is actually a question that arises very often, and I guess it's because the easy assemblies are now a piece of cake, and people start experimenting with more complex setups. What I will want to test (but didn't have time lately) is to put that MasterSketch in a separate document, and include it in both the main assembly and also the sub-assembly. This way it is posible to access the Variables of the MasterSketch in both sub-assemblies. But as I said I didn't have time to test it.
try the Assembly4 workbench for FreCAD — tutorials here and here
tom_hampton
Posts: 12
Joined: Thu Jan 21, 2021 10:27 pm

Re: Asm4: Designing two parts to interface..

Post by tom_hampton »

Zolko wrote: Thu Jan 28, 2021 4:21 pm If the Pedal_Assembly is in the same document, it should be possible. If you want the Pedal_Assembly to be in an external document, it's more tricky, and may-be impossible.

This is actually a question that arises very often, and I guess it's because the easy assemblies are now a piece of cake, and people start experimenting with more complex setups. What I will want to test (but didn't have time lately) is to put that MasterSketch in a separate document, and include it in both the main assembly and also the sub-assembly. This way it is posible to access the Variables of the MasterSketch in both sub-assemblies. But as I said I didn't have time to test it.
So far, I have not found a way within a "part" to reference the assembly master(s) geometrically. To be clear, by "reference" I mean either "carbon copy" or "get external geometry". I HAVE succeeded in referencing constraints from the assembly master sketch within a "part" inside the same file.

I have not attempted any multi-file assemblies, yet. As a grey-beard developer in decades gone by, there's a conceptual appeal to multi-file assemblies. But, there's no need to start chewing on that until single-files get too unwieldly. I'm not really trying to become an ME in my second half-century of life. I"m just trying to model parts for my simulation rig and/or other useful objects around the house.

That said...I like to know how to "do things right". Avoiding the TNP is still tricky for me...well, slow. Creating variables, planes, and datums to avoid TNP, steepens the learning curve significantly, as I workout how to hang a datum in the right place driven by some expression. I've gotten the hang of carbon-copy, and external geometry well enough to draw most of what I need to draw within a multi-part body.
Post Reply