Jump to content

Creating a Planar solid spiral inductor and export file in .STL format


Shihab_Adnan

Recommended Posts

Hi

 

I was trying to desing a solid planar inductor.

 

I first created my own layer with thickness 0.50 mm. Later I created a planar inductor with helix command but i gave only base radius and top radius and kept height at 0. Later i extrude the surface to get the thickness. But the object look like this [attached image]

 

When i try to export the file in .stl (lithography) format, it shows that the object must be solid or watertight mesh. So exporting could not be done.

 

How to resolve this situation. I need a planar inductor of 5mm outer radius, 1 mm inner radius, 500 micrometer line width and thickness of 30 nm.

 

Thanks in advance for your support and Regards

Planar Inductor.jpg

Link to comment
Share on other sites

You are on the right track but need to give the helix an inside and outside wall.

 

Create a helix and then a second one offset from the first, but with the same center. I used the green lines in the following image to make sure the wall thickness was the same at the start and end for the second helix. Explode and flatten the two helices to convert them to polylines. Add end lines to close off the shape and convert the closed shape to a region. Extrude the region to create a solid from which you can export an STL file.

helix1.JPG

helix2.JPG

Link to comment
Share on other sites

Thanks Irm

 

But when i try to offset the helix....it shows an error message. "To offset an object all points should be on the same plane". I checked but my helix doesn't have any height and it seems to me that it is on the XY plane. How to resolve this?

 

Thanks in advance and Regards

Link to comment
Share on other sites

I did not use offset. I created TWO helices with the helix command. The second helix had the same center point as the first but its base radius was smaller than the first helix by the value of the offset you want.

Link to comment
Share on other sites

Thanks Irm

 

But when i try to offset the helix....it shows an error message. "To offset an object all points should be on the same plane". I checked but my helix doesn't have any height and it seems to me that it is on the XY plane. How to resolve this?

 

Thanks in advance and Regards

 

Helixes are CAD entities that are always 3D - when you specify height of 0.0, it's control vertices will always have some 1e-10 elevation value... If you want still to offset those 2d helixes, you should firstly really convert them to 2d curves (helixes)...

 

(defun c:3dhelix2d ( / adoc *error* cmde ss i e ea el ll ell ii y )

 (vl-load-com)
 (setq adoc (vla-get-activedocument (vlax-get-acad-object)))

 (defun *error* ( msg )
   (if cmde (setvar 'cmdecho cmde))
   (vla-endundomark adoc)
   (if msg (prompt msg))
   (princ)
 )

 (vla-startundomark adoc)
 (setq cmde (getvar 'cmdecho))
 (setvar 'cmdecho 0)
 (prompt "\nSelect 3d HELIX(es) to convert to 2d")
 (setq ss (ssget "_:L" '((0 . "HELIX"))))
 (setq i -1)
 (while (setq e (ssname ss (setq i (1+ i))))
   (setq ea (vlax-ename->vla-object e))
   (vla-put-height ea 0.0)
   (command "_.ucs" "w")
   (setq el (entget e))
   (command "_.ucs" "m" (cdr (assoc 11 el)))
   (command "_.ucs" "za" '(0.0 0.0 0.0) (cdr (assoc 12 el)))
   (setq ll el)
   (mapcar '(lambda (x) (if (eq (car x) 10) (setq ell (cons (trans (cdr x) 0 1) ell)))) el)
   (setq ell (reverse ell))
   (setq ell (mapcar '(lambda (x) (trans (list (car x) (cadr x) 0.0) 1 0)) ell))
   (setq ell (mapcar '(lambda (x) (list 10 (car x) (cadr x) (caddr x))) ell))
   (setq el (member (assoc 10 el) el))
   (setq ii -1)
   (foreach x (reverse (cdr (reverse ell)))
     (setq ii (1+ ii))
     (setq y (nth ii el))
     (setq ll (subst x y ll))
   )
   (entmod ll)
   (setq ell nil)
   (command "_.ucs" "p")
   (command "_.ucs" "p")
   (command "_.ucs" "p")
 )
 (*error* nil)
 (princ)
)

 

HTH, M.R.

Link to comment
Share on other sites

HI Irm

 

That was helpful. I made two helix with same center but the second one have the base and top radius less/higher than the first one by the line width i want. Then i exploded each helix TWO TIMES and flatten them to get 2D polylines. Then i close the two end with line and make a region. Then it looks like this as the attachment

 

But when i try to extrude this region it shows "OBJECT CAN NOT BE EXTRUDED". I am stuck in the last step.

 

Please give me some direction to go forward.

Planar Inductor.dwg

Link to comment
Share on other sites

Hi Marko_riber

 

Thanks for the insight. I knew what was problem in my first doing. But i am stuck in another point right now. You can see in my latest thread.

 

However i am not an expert AutoCAD user. Is this code for Autocad command window? Is it possible to draw in Autocad with codes?

Link to comment
Share on other sites

The region you created is about 10,000,000 units across! I see that you have set the units to nanometers. Unit setting in AutoCAD is weird as you are really specifying the INSERTION scale with units and not the units in use. Be careful of using very large numbers for object size or position. Although the database is double precision (15 significant figures), I find it best to keep values below a million.

 

I was able to extrude your spiral after scaling it down by 0.0001

 

~lrm

Link to comment
Share on other sites

Did you check if the result was a solid and not a surface model? Lofting will not always yield a solid although you have set the mode to solid. That is why I prefer using extrude to loft when possible. It may not make a difference as the OP may not want to do further editing and just produce an stl file but using loft did not appear to satisfy the "watertight mesh" requirement for outputting an stl file. ReMark, were you able to produce the stl file after your lofting operation?

Link to comment
Share on other sites

ReMark, I used Loft with AutoCAD 2014 and it yielded a surface model which wold not export to an stl. That is why I asked if you had checked. Not everyone does and I don't know you at all. No offense intended. Peace. lrm

Link to comment
Share on other sites

Well I can repeat the exercise and attach a drawing file if you would like but it won't be right now as I have some other things to attend to.

Link to comment
Share on other sites

Thanks...........I was able to do so.............May be i have to tweak something with units to do so.

 

Thanks again for your support

Link to comment
Share on other sites

Why would you set units to nanometers in the first place? Nanometer = one billionth of a meter. Unless you are working in the field of nanotechnology I see no reason to be using nanometers as your units of measure. What is the overall size of this inductor in the real world?

Link to comment
Share on other sites

I see that you have set the units to nanometers. Unit setting in AutoCAD is weird as you are really specifying the INSERTION scale with units and not the units in use.

 

Units should not be confused with -dwgunits

 

-dwgunits.png

Link to comment
Share on other sites

That is why I prefer using extrude to loft when possible.

I would only use Loft as a very last resort.

 

I was disappointed to find that I couldn't simply Thicken an Extruded helix surface in AutoCAD.

So then I tried Sweeping a line along the curve and Thicken. That worked.

Then I tried Sweeping a rectangle along the curve and that worked.

 

Coil Solid.PNG

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...