About Make2D

Next
 From:  Frenchy Pilou (PILOU)
8368.1 
Does it normal for the internal command Make2D from 3D objects
that the result is drawn in the outer space?
So a big scaling & translate manually must be done!

PS that is not the case for your Make2D4Views http://moi3d.com/forum/index.php?webtag=MOI&msg=8041.1

Here the internal make2D

EDITED: 6 Apr 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:  Michael Gibson
8368.2 In reply to 8368.1 
Hi Pilou, yes that's normal for how it works currently. It's reusing the same code for doing PDF export and so for a perspective view it generates output in PDF "points" coordinates targeting a bounding box of 576 x 768 units ( basically 8 x 10 inches ).

For a non-perspective view like the Top/Front/Right view or the 3D view if it's set to parallel projection the 2D result will be the same size as the objects. Perspective works differently 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)
8368.3 In reply to 8368.2 
THX for the infos!
---
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:  MajorGrubert (CARLOSFERREIRAPINTO)
8368.4 
Hello Michael,

About Make2D and Make2D4views: Its possible that the outlines have/create own layer, like Hidden lines layer do.

Right now this lines are locate on the top layer (mixed with the others objects) and usualy its hard to select and work with.

For me, it wil make more sense one new layer and located just above the Hidden lines layer.

Thanks.

Carlos
  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
8368.5 In reply to 8368.4 
Hi Carlos, please ask me about that again when v4 betas are underway and I can set up an option to do 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
8368.6 In reply to 8368.4 
And maybe say you want "Visible lines" to go on their own layer, when you wrote "outlines" I was thinking of something else because for PDF and AI output there is another type of outline curve that can be generated separately from visible lines.

- 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:  MajorGrubert (CARLOSFERREIRAPINTO)
8368.7 
Hi Michael,

Yes, that's what i was trying to say: a new Visible lines (own) layer.

Thanks.

Carlos

EDITED: 6 Apr by CARLOSFERREIRAPINTO

  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:  hep
8368.8 
Hi Carlos

that is easily solved to define a specific layer. I use a script for construction help lines that i hide and unhide when needed. (in the below they are called "konstruktion")
the script simply create a new style called konstruktion (or reuse the existing one) and attach the konstruktion style to selected lines and the hide them. When you need the lines again you just hit the shortcut again to unhide them.

if you need a layer for 2d drawing lines you just create a new shortcut (like D) with the script below where you have rename Konstruktion to 2Ddrawing. When you have run "make2D" or "make2Dview" you just hit D and you have you 2D lines separated.

script: /* Hide selected objects, and assign to style = Konstruktion */ var gd = moi.geometryDatabase; var styles = gd.getObjectStyles(); var si = -1; for ( var i = 0; i < styles.length; ++i ) { if ( styles.item(i).name.search( /Konstruktion/i ) != -1 ) si = i; } if ( si == -1 ) { var style = gd.addStyle(); style.name = 'Konstruktion'; si = style.index; } var objects = gd.getSelectedObjects(); objects.setProperty( 'styleIndex', si ); objects.setProperty( 'Konstruktion', true );objects.setProperty( 'hidden', true )

//Hep
  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:  MajorGrubert (CARLOSFERREIRAPINTO)
8368.9 
Hi Michael,

Thanks for the script.

It doesn't work as i expected and my needs. It create just one layer (Konstruktion) combining both the Visible lines AND Hidden lines.

What i was hoping for was 2 separate layers: One layer for Visible lines and a second layer for Hidden lines.

Anyway, thanks for your effort. Let's wait for the v4 betas and i'll talk to you about this.

The way that actually the Hidden lines Layer is created (i mean on Make2D and Make2D4views) i assume that could be easy/fast/possible to script a 2nd layer.

Thanks alot.

Carlos
  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
8368.10 In reply to 8368.9 
Hi Carlos, actually that was Hep that wrote that script for you, not me. I didn't think about a script fix up like that, but I think it should be possible to get what you want by a modification to Hep's script there to avoid processing the hidden lines. I'll give that a try tomorrow.

Thanks Hep for the script that is very close to the desired 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:  Michael Gibson
8368.11 In reply to 8368.8 
There's also a findStyle script method that's probably useful for part of this, it has a "Create if not found" parameter like this:

var style = moi.geometryDatabase.findStyle( 'stylename', true /*CreateIfNotFound*/ );

- 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:  MajorGrubert (CARLOSFERREIRAPINTO)
8368.12 
Hello Hep,

I'm sorry. Thanks a lot for the script!

Carlos
  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
8368.13 In reply to 8368.12 
Hi Carlos, please try this version. Run it just after you use Make2D and it should move just the visible lines that were generated onto a style named "Visible lines". Thanks Hep for sharing your script to get started.

script: /* Move Make2D visible lines to their own layer */ var gd = moi.geometryDatabase; var hdn = gd.findStyle( 'Hidden lines', true ); var vis = gd.findStyle( 'Visible lines', true ); while ( vis.index > hdn.index ) vis.moveUp(); var objs = gd.getSelectedObjects(); for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.styleIndex != hdn.index ) { obj.styleIndex = vis.index; } }

- 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:  MajorGrubert (CARLOSFERREIRAPINTO)
8368.14 
Hello Michael and Hep,

Thats is fantastic! It is exactly what i need. Great, just great support and community.

It makes a huge difference have direct contact with the developer and a healthy community willing to help.

Thanks a lot.

Carlos
  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:  hep
8368.15 
Hi Michael and Carlos

I am happy i could contribute a bit to this fantastic program and forum.
Moi3D is just a joy to use :-)

//Hep
  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