Creating a solid object

Next
 From:  mickelsen
4336.1 
How can I turn some joined surfaces into a solid object? (Example included)

Thanks,
Mark

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.2 In reply to 4336.1 
Hi Mark, there are a couple of different surfaces in that example file, are you talking about this "almost solid" piece shown selected here:




The first step for figuring out how to close something up to make a solid is to find where the openings are - there is a script that you can set up on a keyboard shortcut to show you the openings.

To do that, go to Options > Shortcut keys, and add in a new shortcut key - for the key part put in whatever you want to trigger it (I use N myself, for "show naked edges"), and for the command part paste in the script from here:
http://kyticka.webzdarma.cz/3d/moi/#SelectNaked

Then when you push N all the "naked edges" (edges that belong to only one surface instead of joined between 2 surfaces) will get selected and highlighted. So in this case it highlights these edges here:



If you zoom in to those areas you'll see that there is an opening there, also it's made up of some shorter edge pieces as well:



One way to close off something like this is to draw in some lines at the ends of those edge segments like this:



That then gives you a 4 sided boundary that you can fill in with Construct > Network - select these 3 edges and the line curve drawn from above, and then run Network on it:



Repeat that down the line and then join all those surface pieces together which should then make a closed solid.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.3 In reply to 4336.1 
Hi Mark, and attached here is a 3DM file with a solid result in it that I got by using the technique described above.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mickelsen
4336.4 In reply to 4336.3 
Michael,
I'm still working on the same drawing and still having problems. I've tried to back as far as I could in order to make sure that I didn't have any little unconnected sections. In example #1 I have the basic curve that I'm trying to turn into a solid. When I finally get that I will use it to cut holes or depressions in other shapes that I will bring in later. In example #2 I have used the extrude command, telling it to cap both ends, and, hopefully, create a solid. As you can see, it didn't cap the ends. MoI says that the starting curve is a closed curve, so I don't immediately see what the problem is. Can you tell me how to turn that curve into a solid like the "almost" solid in example #2? I'm trying to understand this but I'm having a hard time.
Thanks,
Mark

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.5 In reply to 4336.4 
Hi Mark - so in order for Extrude to automatically produce end caps you need to have a closed and also planar curve not just a closed one.

In your case here your curve is not planar, it has a kind of curved cylindrical like shape to it, so that's why it will not produce end caps on it automatically - the extrude command doesn't know how to fill in the top or bottom on a cylindrically curved shape like that.

Generally what you want to do for a shape like that is to extrude a totally flat shape to get a solid piece and then carve that solid piece with some side profiles to produce the curved cylindrical ends, rather than trying to directly extrude the non-planar curve.

I'll see if I can make some steps to illustrate that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.6 In reply to 4336.4 
Hi Mark, so also as a preparatory step it would be a good idea to clean up the profile curve so that it's not constructed out of a bunch of little fragmented segments.

If you select your curve and then run the Edit > Separate command on it, you'll see that it is actually made up of some small segment pieces like this (you can select them individually after separating them):




That's not so good because when you construct a surface from that by extrusion, each one of those segments will extrude into its own separate face, which means you will have some more fragmentation and more edges and faces in the result than what is really necessary - it would not be the cleanest possible model structure with the fewest number of edges and separate faces in it.

The easiest way to clean that up is to use the Rebuild command on the joined result (before separating). Some information on the Rebuild command here (you need to set up a keyboard shortcut to run it):
http://moi3d.com/2.0/docs/moi_command_reference10.htm#rebuild

In this case I'd recommend running Rebuild, set mode to "Refit", and enter in a tolerance value of 0.001, and check "Delete input objects". That will reconstruct your curves and make longer more simplified segments out of the areas that have multiple small segments in them in the original shape.

After rebuilding if you then use Edit>Separate and select the pieces you'll see that there are only 4 segments in that rebuilt result - that cleaner segmentation will then help make a cleaner output model when you construct from it as well.

So anyway, cleaning up the segmentation of that profile shape is one thing that would be helpful.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.7 In reply to 4336.4 
Then it is possible to flatten your curled non-planar shape down into a planar curve - if you have something that you want to flatten to a world direction you can use the edit grips (the frame that appears around the outside of the selected objects in the 2D views) to squish it down in one of the 2D top/front/right views until you get "flat" snap.

But if you want to flatten something to a particular direction it can be more convenient to use the Transform > Scale > Scale1D command, since it allows you to pick 2 points to define which direction you want the scaling to happen in.

So in your case here you would select the shape you want to flatten:



Then run the Transform > Scale > Scale 1D (scale in 1 direction) command which is located in the UI here:



Now when you're running a command it's always a good idea to look in the upper-right area of the window to see the prompt for what MoI is expecting for you to do next - the first prompt here says "Pick origin point".

You already have a direction line set up for the direction you want to extrude in, pick the base of that line as the origin for the scale:



That will bring up the second prompt, which says "Pick scale direction" - pick the end of the line here:



Now at the third prompt you can pick a point to define the scale amount, or enter in a value - if you slide the mouse down towards the scale origin point you can see that the shape will gradually flatten as you approach it - for this stage you want to enter in a scale factor of 0 (type in 0 and push enter) to completely scale the curve down until it is totally flat around the base of that direction line, like this:



Now that you have a closed and also planar profile you can now select it and extrude it and get end caps like this:



See the attached mark_flattened_profile.3dm file for the flattened result.

- Michael

EDITED: 18 Jun 2011 by MICHAEL GIBSON


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4336.8 In reply to 4336.4 
Now that you have the main extruded form created you can then get the ends formed how you want by slicing some material off of them with some profile curves.

So go to the side view and get your profile cutting curves arranged how you want them, something like this:



In the 3D view it looks like this:



Now that extrusion can be cut by those curves using a boolean command - you can select the extrusion and use Boolean difference to slice it up into pieces by those profile curves. If you have a closed cutting curve that will bore a hole, if you want to kind of cut things and not have holes for closed cutting curves removed you can instead use the Boolean Merge command which just slices everything up and doesn't discard any pieces even when you've got closed curves as the cutting objects. When using boolean merge you just select everything all before running the command instead of having the 2 stage selection process of boolean difference where base objects and then cutting objects are selected separately.

So anyway after using whichever boolean command is the most convenient you will get a sliced up result like so:



Delete the parts that you don't want to get the final result:




In general it tends to be easiest to get a curved end on an object in this way of producing it by slicing the ends off of an initial flat extruded block.

The other way that you can do it though is if you build a surface for the piece to extrude rather than just a curve - when you extrude a surface it is able to be capped because that surface can just be copied to the other end of the extrusion. That method would be to build a surface from the cleanly rebuilt 4-sided shape using sweep or network on it, and then select that surface and extrude it. However, the technique shown here of cutting the ends off is kind of more general purpose and more flexible, since you can have different shapes on each end including things like cut with concentric circles rather than a single copied circle shape like you will get with a direct extrusion.

Hope this helps!

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mickelsen
4336.9 
Thanks, Michael.

I understand this method of creating the solid that I want. (It does make me chuckle though, since that curved outline was originally created by mapping a flat shape into the inside of cylinder using the curve command...8^D)

I do have another question though. I don't understand when you should use the trim command to do something like this and when you should use the boolean commands. Your uses of the boolean commands are not "intuitively obvious" to me (as one college professor told me when I asked him to help me with the solution to a problem. He said that the answer was "intuitively obvious" and just walked away).

Thanks for introducing me to the "rebuild" command. I will use that in many different situations. I thought that that was what I was getting when I used the "join" command. Obviously not.

Mark
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
4336.10 In reply to 4336.9 
Hi Mark -

> It does make me chuckle though, since that curved
> outline was originally created by mapping a flat shape into
> the inside of cylinder using the curve command...

Yeah so actually you wanted to try and construct your starting solid directly off of that initial planar piece rather than doing a projection of it.

This is kind of a frequent mis-step in general - it's pretty natural since it is kind of easy to focus on the outer edges of the final result that you want to get. But often times those final edges are actually easiest to get from the result of a cutting operation rather than trying to create them directly as the first step.

When that's the case you need to kind of not worry about those final edges when constructing the first shape - instead try to get a basic simple and extended shape and then once that is in place cut it up. That kind of goes for a lot of different situations as well - like if you've got some kind of complex boundary for a surface a lot of times you won't want to build the surface directly along that boundary initally but instead build it as a broader and more simplified extended shape and then cut it to get the final boundary in place.


> I don't understand when you should use the trim command
> to do something like this and when you should use the
> boolean commands.

The trim command is a surface modeling operation - it's something that you would generally only use if you are working with some individual surfaces to build your model up kind of one surface sheet at a time. That's a different kind of overall strategic approach than working with solids.

You should generally use the boolean commands instead of Trim if you are working with solids - the booleans are focused on operations between volumes. So using a boolean to cut a solid will produce a solid result, leaving things like the extruded side walls of the cutting objects in place to make the result also a sealed off solid.

Using Trim will always cut a solid into a non-solid because it operates at the surface skin level and not at a volume level like booleans.

See here for some more description and visual examples of the difference between Trim and Booleans:
http://moi3d.com/forum/index.php?webtag=MOI&msg=3883.3


You could basically describe Trim as more of a "low level" operation. The boolean commands are kind of like a high level cutting construct that basically combine surface trimming along with automatically detecting which pieces to discard based on volume containment, followed by automatic joining of things back into solids.

Sometimes the more low level approach of doing the trimming and joining steps manually can be useful for difficult situations, but if possible you can gain some more convenience and a more streamlined number of steps if you can use solids and booleans instead of low level surface trimming, so it's generally a good idea to stick with working with the solid modeling approach and use booleans when it is possible to do so.


> I thought that that was what I was getting when I used the "join" command.

No, the join command is more like a kind of grouping mechanism - it make a new curve object out of those segments, but the segments are still individual child objects of the curve, it doesn't do things like fuse segments together automatically. In the future I may try to do something like that, but there are other situations where it is not necessarily good to fuse segments together so it's kind of tricky to handle automatically.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All