Jump to content

Help with Lisp for flatshot?


Ferronovum

Recommended Posts

Since i ran into a problem with plotting 3D Hidden style with so far no solution, I have an idea for a Lisproutine.

 

The routine is like this:

1 check four assigned layers

2 clear each assigned layer from any objects

3.1 move to dessired(coded) view

3.2 take the flatshot

3.3 insert the shot/block in assigned layer

Repeat for all four views(front, left, back, right)

4 close/freeze the assigned layers in MS

 

In a Layout you have four viewports only showing each assigned layer.

 

Wolahhh Now you have 2D drawings of the 3D object.

This routine should be easy to modify for more or less views and angels.

 

Problem is this, I have this really great idea, but no idea at all how lisp works :? .

 

I could probely learn lisp. I have coded alot C++ back in the days (6-10 years ago). But I need someone to help me get started.

 

I got the Idea, YOU got the knowlegde of Lisp.

Link to comment
Share on other sites

Seams like many users are looking for a code like this cuz many views but none reply

 

However, this is as far as I got with my knowlegde at the moment.

Yes, I used to code in c and c++ :unsure: can anyone translate it to lisp?

 

 
;; Flatshot routine taking shots in front/back/left/right view
;; Author: So far just me
;; by idea of: Björn Lindström
;; 
;; Suggested structure:
for (i=0, i<4, i++)
Command:UCS
Command:G
if (i=0)
 Command:F
 if layer flatshot front doesn't exists
  create layer flatshot front
 set layer flatshot front
 clear layer from objects
 Command:PLAN
 Command:C
 Command:flatshot
 Command insert point:0,0,0
 Command scale factor X:1
 Command scale factor Y:1
 Command rotation: 0
 hide layer flatshot front
 set layer 0
if (i=1)
 Command:BA
 if layer flatshot back doesn't exists
  create layer flatshot back
 set layer flatshot back
 clear layer from objects
 Command:PLAN
 Command:C
 Command:flatshot
 Command insert point:0,0,0
 Command scale factor X:1
 Command scale factor Y:1
 Command rotation: 0
 hide layer flatshot back
 set layer 0
if (i=2)
 Command:R
 if layer flatshot right doesn't exists
  create layer flatshot right
 set layer flatshot right
 clear layer from objects
 Command:PLAN
 Command:C
 Command:flatshot
 Command insert point:0,0,0
 Command scale factor X:1
 Command scale factor Y:1
 Command rotation: 0
 hide layer flatshot right
 set layer 0
if (i=3)
 Command:L
 if layer flatshot left doesn't exists
  create layer flatshot left
 set layer flatshot left
 clear layer from objects
 Command:PLAN
 Command:C
 Command:flatshot
 Command insert point:0,0,0
 Command scale factor X:1
 Command scale factor Y:1
 Command rotation: 0
 hide layer flatshot left
 set layer 0
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...