Combining and exporting parts - the part concept seems to be an illusion
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!
Combining and exporting parts - the part concept seems to be an illusion
Is it possible to export a part as opposed to the contents of a part? It seems that you have to select the contents, and any position adjustments recorded on the part node itself are not taken into account. In my example below, the two pillars are adjusted to xy 0,0 of part009 by settings on sp model as it was created offset from the origin in the first place, and then positioned relative to 0,0 with expressions on the part taken from reference constraints. If I select the 3 part nodes and export as STL, the result is mangled versions of the two pillars but not part009. If I select the active nodes within the parts, the pillars are misplaced. I tried various combining attempts and moving the pillar parts inside part009, all to no avail.
So in short, I'm stuck on how to export as the parts appear as a single STL file. I could take the sp model nodes out of the pillar parts, re calculate what the positioning needs to be and union them with the fusion in part009, but then there seems no benefit in the part concept if everything has to be a single part to be exportable intact.
Any suggestions on how to progress from here very welcome!
So in short, I'm stuck on how to export as the parts appear as a single STL file. I could take the sp model nodes out of the pillar parts, re calculate what the positioning needs to be and union them with the fusion in part009, but then there seems no benefit in the part concept if everything has to be a single part to be exportable intact.
Any suggestions on how to progress from here very welcome!
- Attachments
-
- parts-problem3.FCStd
- (87.73 KiB) Downloaded 53 times
Re: Combining and exporting parts - the part concept seems to be an illusion
I'm short on time and can't look at your FCStd file, but
Otherwise, I don't understand why you want a single STL of three separate parts...
Do you want a single STL with the 3 parts fused as one? If that's the case, then you are not using Part containers properly, and you should only have a single Part container, with the pillars inside it.
Otherwise, I don't understand why you want a single STL of three separate parts...
Re: Combining and exporting parts - the part concept seems to be an illusion
Thanks for the reply Norman, and yes, the intent is a single part. I ended up with the pillars as parts in their own right as I worked on the pillar separately, printed one on its own as a test, and now want to combine them with the case. Mentally I saw them as parts because they're entities that might get used in another part down the line, and at one point had the pillar parts inside part009 (i.e. "this part includes these other parts") as that intuitively made sense.
Anyway, copying the pillar part contents into the main part is presumably what I need to do, but then I'll lose the offsetting and rotation that is currently specified at the part level for the pillars. Is there a trick to creating a container to which the offsetting currently on the pillar parts can be applied to, such as intersecting each pillar with a cube and offsetting the result with the same expressions that are currently on the pillar parts?
Anyway, copying the pillar part contents into the main part is presumably what I need to do, but then I'll lose the offsetting and rotation that is currently specified at the part level for the pillars. Is there a trick to creating a container to which the offsetting currently on the pillar parts can be applied to, such as intersecting each pillar with a cube and offsetting the result with the same expressions that are currently on the pillar parts?
Re: Combining and exporting parts - the part concept seems to be an illusion
I use to merge in an union many STEP models and I needed exactly this feature... so I developed a macro to fuse Part containers, using their own relative placement... Here is your file unioned and the STEP and STL exported file... I used my WB kicadStepUp and its internal union button.
You can install the WB through the Tools menu.
Maurice
Re: Combining and exporting parts - the part concept seems to be an illusion
Many thanks Maurice, that's great! Replicated the stl generation. Progress continues a bit further.
Re: Combining and exporting parts - the part concept seems to be an illusion
the solution is far more simple, .....I think,.... someone correct me if I am missing something....... but this certainly works for a simple example like I have attached.moggie wrote: ↑Wed Feb 14, 2018 6:29 pm Thanks for the reply Norman, and yes, the intent is a single part. I ended up with the pillars as parts in their own right as I worked on the pillar separately, printed one on its own as a test, and now want to combine them with the case. Mentally I saw them as parts because they're entities that might get used in another part down the line, and at one point had the pillar parts inside part009 (i.e. "this part includes these other parts") as that intuitively made sense.
Anyway, copying the pillar part contents into the main part is presumably what I need to do, but then I'll lose the offsetting and rotation that is currently specified at the part level for the pillars. Is there a trick to creating a container to which the offsetting currently on the pillar parts can be applied to, such as intersecting each pillar with a cube and offsetting the result with the same expressions that are currently on the pillar parts?
A PartDesign "Part" can contain anything ....including another "Part". So you just have a hierarchy of "PartDesign Parts".
Lets say we have a Part - Car engine, it will contain Part - piston assembly, which will contain Part - piston as well as Part - Set of rings.
If you select the PartDesign Part at the top of the hierarchy, then then Parts below will also be exported in the manner you discussed.
So as far as I understand, all you had to do was create a new PartDesign Part and then drag and drop the other "Parts" into it.
I have not tested to see if you get an invalid stl though, it is possible intersecting solids may produce a non-manifold mesh.
OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13289 (Git)
Build type: None
Branch: master
Hash: 23fff2b1d3a066d335dea509694e8f83f859d16a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/Australia (en_AU)
my example is just a cylinder and cuboid.
I just realised I accidentally deleted the fcstd file, ....and I have to run now ...something urgent just came up, I got a call from a local farmer that he has a calf who's mum is too sick to look after her calf, so I have to go get the calf to hand raise it. But I have to go right now....I'll be back in a few hours or so.
Jim
Re: Combining and exporting parts - the part concept seems to be an illusion
I hope the calf is well!
I have created a model according to Jim's advice and all three subparts are exported. However, The position of the sphere is different in FreeCAD and STL. I'm not sure if this is a problem of the export or of FreeCAD: The sphere is attached to YZ plane and is moved in Z direction.
I have created a model according to Jim's advice and all three subparts are exported. However, The position of the sphere is different in FreeCAD and STL. I'm not sure if this is a problem of the export or of FreeCAD: The sphere is attached to YZ plane and is moved in Z direction.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Combining and exporting parts - the part concept seems to be an illusion
Things are definitely wrong when one of the parts has a placement, which seems to be very natural for parts.
The placement is ignored on export.
We have seen this in other places as well, e.g. when creating a ShapeBinder and I think this is one of the most important issues concerning Parts and Bodies.
Currently as a workaround I never use Part Placement, but that degrades the part to be hardly more than a group.
The placement is ignored on export.
We have seen this in other places as well, e.g. when creating a ShapeBinder and I think this is one of the most important issues concerning Parts and Bodies.
Currently as a workaround I never use Part Placement, but that degrades the part to be hardly more than a group.
- Attachments
-
- movePart.FCStd
- (13.63 KiB) Downloaded 48 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Combining and exporting parts - the part concept seems to be an illusion
What is really missing atm is a single copy with the respect of relative placementchrisb wrote: ↑Thu Feb 15, 2018 7:50 am Things are definitely wrong when one of the parts has a placement, which seems to be very natural for parts.
The placement is ignored on export.
We have seen this in other places as well, e.g. when creating a ShapeBinder and I think this is one of the most important issues concerning Parts and Bodies.
Currently as a workaround I never use Part Placement, but that degrades the part to be hardly more than a group.
I posted already a mantis bug request
https://www.freecadweb.org/tracker/view.php?id=2905
unfortunately it is still unassigned
here some thread with similar issueKunda1 wrote:issue #2905
https://forum.freecadweb.org/viewtopic. ... 0&p=167153
https://forum.freecadweb.org/viewtopic. ... 41#p195863
Last edited by easyw-fc on Thu Feb 15, 2018 6:41 pm, edited 3 times in total.
-
- Posts: 241
- Joined: Wed May 31, 2017 11:49 pm
Re: Combining and exporting parts - the part concept seems to be an illusion
I admit to not reading the details of all responses as they confuse my oldmachine brain.
I glean that you want to export an STL of the complete gizmo with the related stuff in the correct location.
This may help - and I apologize for stepping on toes by saying, regardless of how the FreeCad capabilities were coded and intended, I use them the way that works for me. To that end:
Using the PartDesign Workbench.
First, I decide how I'm going to use the model, then decide how to model it (regarding Parts and/or Bodies).
Having said that - attached shows Two dumb models: One from a Part, with it's Bodies, the other from Bodies (no Part).
In each case, the individual bodies can be selected and exported as individual STL's. (Could also select the Pad/Pocket and export them individually).
In each case, the individual bodies can be selected at same time and exported as a unified STL.
In either case, the Bodies (and features) end up in the correct location in 3D space. Shown in software I use for Printing 3D (as long as the 3D software pref's are set to NOT center upon Import).
So, in the end, Design it the way you want it and Export the Part and/or Bodies for your needs.
[UPDATE} added the two files
I glean that you want to export an STL of the complete gizmo with the related stuff in the correct location.
This may help - and I apologize for stepping on toes by saying, regardless of how the FreeCad capabilities were coded and intended, I use them the way that works for me. To that end:
Using the PartDesign Workbench.
First, I decide how I'm going to use the model, then decide how to model it (regarding Parts and/or Bodies).
Having said that - attached shows Two dumb models: One from a Part, with it's Bodies, the other from Bodies (no Part).
In each case, the individual bodies can be selected and exported as individual STL's. (Could also select the Pad/Pocket and export them individually).
In each case, the individual bodies can be selected at same time and exported as a unified STL.
In either case, the Bodies (and features) end up in the correct location in 3D space. Shown in software I use for Printing 3D (as long as the 3D software pref's are set to NOT center upon Import).
So, in the end, Design it the way you want it and Export the Part and/or Bodies for your needs.
[UPDATE} added the two files
Last edited by oldmachine on Thu Feb 15, 2018 4:50 pm, edited 1 time in total.
MAC OSX Sierra
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots
3D Parts & Links (made using FreeCad and Solidworks): https://www.thingiverse.com/Still_Breathing/designs
Android App & Links: https://play.google.com/store/apps/deta ... .bestknots