Home
Reply
New Visitor
pabula0
Posts: 2

A ploblem about revolving to form 3D len? Why can not "sweep:law" work?

I have a question concerning construst a 3D len.I use the following scheme language to get a plane object about lens. The consequent step is to revolve the plane (360 degree)  to form a 3D len. The code is:

 

     (define law1 (edge:law "vec (x, -0.0666651612341147*x^2/(1+(1-(1-2.90234442453716E-10)*-0.0666651612341147^2*x^2)^0.5)+0.01190073539912*x^4-0.00019291731647842*x^6+(1.27316419174074E-6)*x^8-(3.91685870270903E-9)*x^10+(4.66753939051171E-12)*x^12 ,0)" (law:eval -15) (law:eval -12.15)))

 

      (define line3(edge:linear (position  -12.15 10.8608965592307 0) (position 0 10.8608965592307 0)))

      (define line2(edge:linear (position 0 10.8608965592307 0)(position 0 0 0)))

      (define line1(edge:linear (position 0 0 0)(position -15 0.0450030100572576 0)))

      (define wirebody (wire-body (list law1 line3 line1 line2)))

 

law1  line1 &2 &3 form a plane.Then I use the following code to form a 3D len. But it fails and appears ERROR as follows.

 

(define sweep1 (sweep:law wirebody (position 0 0 0) (gvector 0 0 0)(sweep:options "sweep_angle" 360)))
*** ERROR *** sweep:law: Out of domain of pow function

I greatly appreciate if anyone can help me!

New Visitor
pabula0
Posts: 2

Re: A ploblem about revolving to form 3D len? Why can not "sweep:law" work?

PS: the code is run in tracepro (using macro language)

Spatial Employee
Entity
Posts: 64

Re: A ploblem about revolving to form 3D len? Why can not "sweep:law" work?

Hello pabula0,

 

This appears to be a bug in the way in which ACIS makes B-spline approximations to law curves.  If you try (edge:length law1) rather than the sweep operation, for example, you will get the same error, and for the same reason.

 

The difficulty you are having has to do with the definition of your law1 edge.  The problem is that the argument of the square root is very close to zero for your start parameter x = -15.  ACIS is stepping a little outside the edge range (to x = -15.0008)  when making the curve's B-spline approximation, which is enough to make the argument of the square root go negative.  This is the source of the error message.

 

You may wish to log this incident with support if it is of importance to you.

 

Regards,

John

rxu Spatial Employee
Spatial Employee
rxu
Posts: 32

Re: A ploblem about revolving to form 3D len? Why can not "sweep:law" work?

Hi pabula0,

 

As John pointed out above the law edge curve has problem, you can find out by (entity:check  law1 30).

 

Also, I think the sweeping input  gevctor, (gvector 0 0 0), might be (gvector 1 0 0).

Regards,

Renjie