SW API curvature method?
SW API curvature method?
(OP)
"...A positive curvature by convention implies a centre of curvature on the side pointed away from by the surface normal (convex)..." - what does that mean in terms of this method:
h ttp://help .solidwork s.com/2011 /english/a pi/sldwork sapi/solid works.inte rop.sldwor ks~solidwo rks.intero p.sldworks .isurface~ evaluateat point.html
example:
http:// help.solid works.com/ 2011/engli sh/api/sld worksapi/E valuate_Po ints_on_Su rface_Exam ple_VB.htm
so then...
vEval = swSurf.EvaluateAtPoint(vClosePt(0), vClosePt(1), vClosePt(2))
vEval(9) or vEval(10) should be positive or negative depending on direction?? I dont understand
h
example:
http://
so then...
vEval = swSurf.EvaluateAtPoint(vClosePt(0), vClosePt(1), vClosePt(2))
vEval(9) or vEval(10) should be positive or negative depending on direction?? I dont understand






RE: SW API curvature method?
EvaluateAtPoint is a method of the Surface. Surfaces are different from Faces. Solid Bodies are made up of Faces, and Faces are made of Surfaces. The convention for a Face is that the normal points outward, away from the solid body. A surface is not part of a solid body, so there is no convention on which direction the normal points. As mentioned in the help, the FaceInSurfaceSense method of the Face2 tells you whether or not the normal of the face (with points away from the body) is in the same direction as the normal of the surface that defines the shape of the face.
So, in order to determine if a face is concave or convex with respect to its body, you need to know both the curvature (vEval(9) and vEval(10)) and the status of FaceInSurfaceSense to tell you whether the face normal and surface normal point in the same direction. Please note (as stated in the help) that the result of FaceInSurfaceSense is opposite of what you would expect... It returns "True" if the normal vector of the face points in the opposite direction of the surface.
CODE
Curvature FaceInSurfaceSense Cave/Vex
Positive True Cave
Negative True Vex
Positive False Vex
Negative False Cave
-handleman, CSWP (The new, easy test)
RE: SW API curvature method?
RE: SW API curvature method?
-handleman, CSWP (The new, easy test)
RE: SW API curvature method?
RE: SW API curvature method?
A face's normal vector will always point away from the "inside" of the body.
The shape of a face is defined by a Surface.
A Surface doesn't have an inside or outside. The normal vector of a surface will point toward one side or the other, but always points to the same side across the whole surface.
There is no way to "predict" which side of a surface the normal will point to. If the surface is a cylinder, the surface normal could point toward the center of the cylinder or it could point to the outside of the cylinder. Just because all the cylinders you have seen so far have their underlying surface normal pointing in one way or the other doesn't mean jack.
You must have both the curvature value and FaceInSurfaceSense to know for certain whether the solid body is concave or convex at that point.
Oh, and think about this... Just food for thought. A surface can be concave in one direction and convex in the other. That's why you get two values for the curvature. Think about a point on the inside of a torus (donut).
Saying that you can find out concave/convex by just using FaceInSurfaceSense because it matches up with what you have seen so far is like saying that all pets are dogs because you've never seen a cat.
-handleman, CSWP (The new, easy test)
RE: SW API curvature method?