Graphscad

Graphscad : The Graphic Nodal Editor for OpenScad
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Problem with paths in 'use<..>' statements. See callcall example

View previous topic View next topic Go down 
AuthorMessage
ChrisLT



Messages : 45
Date d'inscription : 2017-01-30
Localisation : Newbury, Berkshire, England

PostSubject: Problem with paths in 'use<..>' statements. See callcall example   Mon 13 Feb - 18:34

Sorry this post is so long. To cut to the chase, the current practice of creating display.scad in the folder containing the executable graphscad creates problems for finding files referenced by callmodule.

The callcall.scad example puts the line
use <examples_graphscad/callmodule.scad>
in display.scad. display.scad is placed in the parent folder, so examples_graphscad is found correctly by OpenSCAD, which can find callmodule.scad.

If callmodule.scad is explicitly loaded and run in GraphSCAD it puts similar lines, such as:
use <examples_graphscad/multicopter.scad>
in its display.scad. No problem.

But when OpenSCAD, running the display.scad of callcall.scad evaluates callmodule.scad it sees
use <examples_graphscad/multicopter.scad> which it takes relative to the location of callcall.scad so OpenSCAD gives error messages 'Ignoring unknown module multicopter.scad' etc.
All the other GraphSCAD examples can be loaded directly into OpenSCAD, but the ones with 'use' statements all fail for the same reason. This applies to callnacamodule.scad, callcall.scad and callmodule.scad.

OpenSCAD documentation says 'Library files are searched for in the same folder as the design was open from, or in the library folder of the OpenSCAD installation. You can use a relative path specification to either.'

A possible solution, I suggest, is to put display.scad in examples_graphscad and to take out all relative paths in the examples.

I note also that, if I edit callnacamodule.scad to replace 'use <examples_graphscad/nacaprofile.scad>' with 'use <nacaprofile.scad>' and directly load it into OpenSCAD it runs correctly. If I load it into GraphSCAD it reinserts 'examples_graphscad/'. In display.scad this is fine, but it also shows the path in its graphical window and saves it in the callnacamodule.scad that I then Save, which is not fine.

This behaviour has been observed with GraphSCAD 1.0.6 on Ubuntu 16.04
Back to top Go down
View user profile
Admin
Admin


Messages : 59
Date d'inscription : 2017-01-08

PostSubject: Re: Problem with paths in 'use<..>' statements. See callcall example   Mon 13 Feb - 22:16

good catch Chris. Was a little disapointed by this bug. Will workon this.
Back to top Go down
View user profile http://graphscad.forumotion.com
Admin
Admin


Messages : 59
Date d'inscription : 2017-01-08

PostSubject: Re: Problem with paths in 'use<..>' statements. See callcall example   Tue 14 Feb - 0:16

fixed it using your suggestion. seem to work well on all examples.

the directory graphscad_examples is now named graphscadfiles.

It works even if current path is not current directory
Back to top Go down
View user profile http://graphscad.forumotion.com
Sponsored content




PostSubject: Re: Problem with paths in 'use<..>' statements. See callcall example   

Back to top Go down
 
Problem with paths in 'use<..>' statements. See callcall example
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Graphscad :: Issues-
Jump to: