cg: update pipeline to lcs property WIP
This commit is contained in:
parent
c27b99ff52
commit
6c7e8c46d6
3 changed files with 11 additions and 2 deletions
|
@ -51,13 +51,18 @@ def json_to_blend(js_data, **cg_config):
|
|||
bobj = None
|
||||
|
||||
if js_data[fc_file][js_obj]['type'] == 'LCS':
|
||||
if not js_obj.endswith(cg_config['lcs_inlet']) and not js_obj.endswith(cg_config['lcs_outlet']):
|
||||
if not js_data[fc_file][js_obj].get('Robossembler_SocketFlow'):
|
||||
#if not js_obj.endswith(cg_config['lcs_inlet']) and not js_obj.endswith(cg_config['lcs_outlet']):
|
||||
logger.info('LCS %s is not defined!', js_obj)
|
||||
continue
|
||||
bobj = bpy.data.objects.new(js_obj, None)
|
||||
bobj.empty_display_type = 'ARROWS'
|
||||
bobj.empty_display_size = round(random.uniform(0.05, 0.15), 3)
|
||||
bobj.show_in_front = True
|
||||
for attr in js_data[fc_file][js_obj].keys():
|
||||
if 'Robossembler' not in attr:
|
||||
continue
|
||||
bobj[attr] = js_data[fc_file][js_obj][attr]
|
||||
lcs_collection.objects.link(bobj)
|
||||
imported_objects['objs_lcs'].append(bobj.name)
|
||||
|
||||
|
|
|
@ -54,6 +54,10 @@ def freecad_to_json(**kwargs):
|
|||
|
||||
if obj.isDerivedFrom('PartDesign::CoordinateSystem'):
|
||||
js_obj['type'] = 'LCS'
|
||||
for attr in dir(obj):
|
||||
if 'Robossembler' not in attr:
|
||||
continue
|
||||
js_obj[attr] = getattr(obj, attr)
|
||||
|
||||
elif obj.isDerivedFrom('Part::Feature'):
|
||||
js_obj['type'] = 'PART'
|
||||
|
|
|
@ -283,7 +283,7 @@ if __name__ == '__main__':
|
|||
'--linear_deflection',
|
||||
type=float,
|
||||
help='Max linear distance error',
|
||||
default=0.1,
|
||||
default=0.01,
|
||||
required=False
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue