-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fig2u3d (partially) working on 2015a... #6
Comments
I've seen in the MathWOrks FIle Exchange that there was a patch proposed by markusha slightly different to the on I've applied to With the proposed change, everything works perfect! (At least for |
Thank you for reporting your findings, and confirming that the changes proposed by markusha work for you too. For posterity, the file mentioned in the OP is normals = get(hp,'VertexNormals') MathWorks changed the graphics API, and I haven't followed through, because I stopped using Matlab 4 years ago, and haven't found the time to update this package. From the information reported, it appears that This results in a division between empty arrays later, on line 32. Quoting the information provided by the user markusha at the FEX comments: 31 Oct 2016 markusha:
09 Nov 2016 markusha:
|
I cannot understand: "I had the same error 81110005 that was previously commented in another message." from the OP. Could you please elaborate on the "was previously commented in another message"? |
Relevant to #5. |
The mesh_normal function find the normal unit vector or direction vector, so I change the code to do that as
|
Thank you very much for this wonderful package that allows me to insert interactive 3d plots in my presentations!!!
Nevertheless, I had a lot of problems to make it work in Matlab R2015a, and my success is only partial...
First, I had a problem with the file
mesh_normals.m
infig2idtf/auxiliary
. It seems that this script does not produce / generate the correct normals for mesh surfaces. So, it generates an error when 'normals' is empty: when it tries to normalize the normal vectors, it complains about the operation./
between empty matrices. I've included a check for this condition that returns an empty 'normals' without normalization.And I had to manually comment some lines in other scripts that check the condition
isnan()
for various handles (two places):fig2idtf/preprocess/u3d_pre_contourgroup.m
andfig2idtf/preprocess/u3d_pre_quivergroup.m
With these corrections,
fig2u3d
is able to generate the idtf file, but then the system explodes when it calls toIDTFConverter
. I had the same error 81110005 that was previously commented in another message.If I edit manually the IDTF file and remove from the
MESH
resource everything related toNORMALS
(I set
MODEL_NORMAL_COUNT
to 0, and removeMESH_FACE_NORMAL_LIST
andMODEL_NORMAL_LIST
) I can run theIDTFConverter
without any flaw and the u3d file works great in latex and PDF.I guess that the problem comes from the file
mesh_normals
, but I cannot find useful information about this function.Any comment that can help me to correct this issue will be welcome.
Javier
The text was updated successfully, but these errors were encountered: