-
Re: How can I flip the normal vector of the curved surface using API?
Josh Brady Nov 15, 2016 10:18 AM (in response to Toru Yokoyama)Yokoyama-san,
I don't think there's a way. I don't think it's possible to do through normal user interface either. Please see this thread:
Reversed Normals - Workflow Question
If you know a way to do through the user interface, please post and we may be able to reverse-engineer to API method.
-
Re: How can I flip the normal vector of the curved surface using API?
Toru Yokoyama Nov 16, 2016 8:01 AM (in response to Josh Brady)Brady-san,
Thank you for an answer for my question.
And, Thank you for informing " Reversed Normals - Workflow Question ".I am sorry that I omit explanation .
I want to reverse the normal vector of one curved surface this time.
By the way , I can reverse the normal vector of the curved surface of Solidworks by the CAD software called "Rhinoceros" in 1click.
I import the curved surface into Solidworks and do not confirm the normal vector.
I wanted to realize a command same as it in API of Solidworks.I think that there is not reverse-engineer in Solidworks in correlation of various geometry such as STARTING POINT or FINISHING POINT,too.
But I think that I may reverse a normal vector if it is an imported curved surface.
I thought that it is possible because it does not have correlation of the geometry including STARTING POINT or FINISHING POINT.
I do not mind even that I reverse a normal vector by the import of the curved surface or copying.
After all will it be difficult? What a shame!Thanks,
Toru
-
-
Re: How can I flip the normal vector of the curved surface using API?
Greg James Apr 3, 2018 8:58 PM (in response to Toru Yokoyama)The orientation of surfaces has given me a lot of problems too. Solidworks seems to have totally missed the pont, especially in the UI, but...
If you can write a macro, find the bad IBody2 objects by testing their IFace2 normals. Then try IBody2.Negate() for the bad ones.
The documentation for Negate() is awful. It seems to work for me, since after calling it, the Surface Offset operation does its offset in the opposite direction from what it did before.
-
Re: How can I flip the normal vector of the curved surface using API?
Greg James Apr 4, 2018 2:11 PM (in response to Greg James)Important -- IBody2.Negate() lasts only until a document rebuild. After a rebuild, the surface will be back the way it was.
-
Re: How can I flip the normal vector of the curved surface using API?
Artem Taturevych Apr 4, 2018 6:56 PM (in response to Greg James)Greg, would that help? 2016 SOLIDWORKS API Help - FaceInSurfaceSense Method (IFace2) . Sorry if i misunderstand the issue you have.
-
Re: How can I flip the normal vector of the curved surface using API?
Greg James Apr 4, 2018 9:14 PM (in response to Artem Taturevych)Hi Artem!
That's an interesting looking method. Thanks. I'm testing the surface normal against a model space vector, and comparing surfaces to one another. For that, getting the IFace2 normal works great. If I need solidworks to do something that involves the surface facing, like offset or 'view normal to' or export, then calling Negate() to temporarily flip it has worked well so far.
-
-
-