Box modeling in MoI - Script request.  1-20  21-28

Next
 From:  PaQ
2088.1 
Hello Moidelers ! ...

From time to time (and especially this last days), I have to model so really basic cubic shapes in MoI, and comming from poly-modeling school, I
apply my box modelling technique inside MoI.

Stuffs like that for example :


While doing that in a poly software will require 15sec using a unique tool (poly bevel), it will require way more time in MoI and different function (extracting edge, offset, extrude, union).

To speed-up a little bit the process, is it possible, by a script, to extract edges from a surface selection ?

Something like :



will return this ...


So I can easily apply an offset on it ->


I know it sounds like I'm in a script supermarket, but programming/scripting is really not my cup of coffee :S



And just to improve my modeling method, what would be the fastet workflow to create something like this in MoI ?





In modo it requires exactly 3 clicks, but if I have to do the same thing if MoI, I'm sure I'm good for 3 minutes of curves offseting, extending, triming, extruding, booleans ...
(btw don't take this as a complain, MoI is so faster in many other area :))

Just curious to see some input from some native nurbs guy :)

EDITED: 3 Dec 2015 by PAQ

  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
2088.2 In reply to 2088.1 
Hi PaQ, actually I was just going to ask you if you ran into anything
that would have helped speed up your recent session!

For the offset script - one quick note on that you don't actually
need to extract or duplicate the edge curves in order to offset
them, offset can work directly off on an edge selection. Similarly
if you have many individual curve segments touching end to end
you don't need to join them first before offset, it incorporates a
join into it automatically.

re: switch selection from faces to the edges of the face,
this should do that:

code:
script:var gd = moi.geometryDatabase; var faces = gd.getSelectedObjects().getFaces(); gd.deselectAll(); for ( var i = 0; i < faces.length; ++i ) faces.item(i).getEdges().setProperty( 'selected', true );


Please let me know if that doesn't do what you need.


Re: best way to do that, I'll take more of a look into that in a
minute, but one simple thing you might like is automatically
running offset at the end of that edge selection script above.
This should do that:

code:
script:var gd = moi.geometryDatabase; var faces = gd.getSelectedObjects().getFaces(); gd.deselectAll(); for ( var i = 0; i < faces.length; ++i ) faces.item(i).getEdges().setProperty( 'selected', true ); moi.command.execCommand( 'offset' );


- 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:  PaQ
2088.3 
All right, looks there a many things to learn about the offset workflow, that's really exciting !
Thanks a lot Michael for the scripts allready, amazing feedback as usual.

It's starting to be late here, so I'm back in this thread in few hours to testing all the goodies.

Thanks again.
  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:  DannyT (DANTAS)
2088.4 In reply to 2088.1 
Hi PaQ,

>Just curious to see some input from some native nurbs guy :)

Well it depends on the software, there are a few Cad programs out there where the extrude function has a few more features, like offset and boolean as you're extruding, for example: you could create a box using a single line. In MoI I would do what you have done and suffer the whole 3 minutes ;)

Cheers
~Danny~
  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
2088.5 In reply to 2088.1 
Hi PaQ, I see that the case that you want to speed up is more difficult because you want it to protrude from 2 faces instead of just a single face, is that correct?

You're probably doing fine with a single face, just offset, extrude, then union.


For the multiple faces I would probably go for these steps currently:

Select these edges - note the unselected one:



Offset:



Select these edges, again with the common one unselected:



Offset, use end snap to align the offsets:



Draw a line:



Select the line and the first offset:



And extrude (note, same as offset extrude does not need a join step, it will do it built in):



Select the line and the second offset curve and extrude - note there is no snap here to get precisely the same extrusion depth as the other one, but probably for your purposes if you just eyeball it to be close that would be ok?




Select the 3 solids and do boolean union:





No trimming or extending involved, so this is probably faster...

It would probably be pretty hard to come up with just a script to improve that, but it kind of calls out for some improvements to offset and extrude to handle a single outline that is made up of several different planar chunks. I'll think about that a bit.

- 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
2088.6 In reply to 2088.4 
Hi Danny,

> Well it depends on the software, there are a few Cad programs out
> there where the extrude function has a few more features, like offset
> and boolean as you're extruding, for example: you could create a box
> using a single line.

Yeah, I would like to kind of incorporate some of that into MoI in the future, like some kind of operation for automatically fusing the result of an extrusion with a base object.

But typically in the CAD programs that do that, your extrusion is something that comes from a single planar sketch curve... Does NX handle the situation that PaQ is trying to do in this case of extruding from multiple different planar faces in one step?

Really the single plane case is not particularly time consuming in MoI either, you do have to use like 3 tools to do it, but it should come together quite quickly.

The multi-plane case takes a lot more steps though.

- 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:  Frenchy Pilou (PILOU)
2088.7 
With the beginning of proliferation of scripts (actual and future) does not a cool idea
to make a visual dictionary ?
(same thing is arrived with ketchup actually more than 650 scripts! )
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
2088.8 In reply to 2088.7 
Hi Pilou, definitely would be great to do that at some point.

Right now though there probably isn't enough time available to do that, I would have to stop answering questions here on the forum or eliminate some of the features of v2 in order to have enough time...

But at some point in the future that would definitely make sense!

- 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:  Frenchy Pilou (PILOU)
2088.9 
And for your form I have a very more easy and speedy method!
Just remark that corner form is the same that the big primary form!
So just copy move it and Scale 3D !!!
And rescale it 1D for the irregular position for the "vertical" ;)
And make boolean Diff for the "Horizontal"
Seems to me very more efficient and speedy!
Scale method is very strong for simulate "box modeling" in nurbs when you have well understand the position of the "First Point"!
I have made the figure in 10 secondes ;)

EDITED: 16 Oct 2008 by PILOU

Image Attachments:
Size: 33.3 KB, Downloaded: 19 times, Dimensions: 357x376px
  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
2088.10 In reply to 2088.9 
Hi Pilou,

> Just remark that corner form is the same that the big primary form!

It is in this particular example, but I don't think that will be the case in the situation that PaQ needs to use it in - there he'll have the primary form be some very large complex spaceship and these 2 faces will be just one small little part of it.

- 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:  Frenchy Pilou (PILOU)
2088.11 In reply to 2088.10 
Sure maybe a little more complex for the first post
but remark again right part is the same and the left part will work with your method! :)
  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:  Frenchy Pilou (PILOU)
2088.12 In reply to 2088.2 
here the 2 faces of the internal angle selected
Faces selected are well inversed in edges selected but the Offset can't obtain result wished ;)
Same if I unselect the commun edge after apply script

EDITED: 16 Oct 2008 by PILOU

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
2088.13 In reply to 2088.12 
Hi Pilou, yes offset can not currently take all those curves at the same time.

If you follow the steps here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=2088.5
You'll see that I select only one loop at a time instead of everything all at once.

You can select more than one curve to offset, but not when they touch like that, it tries to join those touching sections together into one loop and you've got multiple branches in there instead of one single loop result.

- 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:  DannyT (DANTAS)
2088.14 In reply to 2088.6 
Hi Michael,

>Does NX handle the situation that PaQ is trying to do in this case of extruding from multiple different planar faces in one step?

No, it does't, same as MoI minus a few clicks. It will extrude multiple planar faces at once but at 45 degrees, then there will be a extra step in trimming the ends.

---------
~Danny~
  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:  PaQ
2088.15 In reply to 2088.14 
So thanks for the 2 little scripts Michael, works perfectly.
I was more less using the same construction method, but with some uneened extra step (like joining lines before the offset).
  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
2088.16 In reply to 2088.15 
Hi PaQ - a bit of experimenting with a kind of "multi-planar" outline Extrude concept:



Still some things to clean up on it, but the idea is to make it recognize when a single closed curve is made up of multiple planar "chunks" and treat each of those chunks more like a planar face being shelled.

If I can iron out some of the details that could be one step to speed up this kind of box modeling process. There is some good possibility to add similar multi-planar single-outline processing to Offset and Planar I think.

- 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:  PaQ
2088.17 In reply to 2088.16 
Michael, I just can't wait to have my hand on it !

Looks so simple and natural :)
  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:  Frenchy Pilou (PILOU)
2088.18 
Christmas for PaQ :)
But it is always Nurbs modeling? ;)

EDITED: 19 Oct 2008 by PILOU

  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:  eric (ERICCLOUGH)
2088.19 In reply to 2088.18 
Very nice, Michael ...
It could be very useful for me, too.
eric
  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
2088.20 In reply to 2088.19 
The kind of corresponding thing for Planar would be to be able to make a shape like this:



Into a solid by adding 3 planes with just one go of the Planar command.


But I seem to have run into a pretty major snag though, with the problem of multiple possible planar groupings.


Like for example this shape:



You would want this planar grouping I think:



But here is an alternate planar grouping (same curve viewed from a different angle to see the different planes more clearly):




Maybe that one is solvable by using the smallest number of planes... But this one looks pretty hard to decide:




For Cap there would be a way to figure out which of the 2 was needed since the one that overlaps existing planes could be avoided. But for just a standalone curve being processed I'm not sure if there would be a good way to choose...

I'll have to think about it for a bit but I'm not so sure right now if this will really work as I had initially thought....

- 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

 

 
Show messages:  1-20  21-28